I'd look again *very carefully* at the Tcl FAQ which discusses avaiable
extensions to Tcl:
http://www.teraform.com/~lvirden/tcl-faq/
I've heard of several attempts at such an extension, and others exist
that can cover this kind of thing (like SWIG).
--
Jeffrey Hobbs office: 541.683.7891
Nomad of the 'Net email: jho...@cs.uoregon.edu
URL: http://www.cs.uoregon.edu/~jhobbs/
Well you might want to look into some of the object-oriented extensions.
IMHO none of the available OO extensions is ideal. But to take your points
individually, you can get constants by using a preprocessor. C doesn't have
constants either. Arrays can be used quite effectively as structures. You
might also look into keyed lists in TclX, or, if you need a specific data
structure, you can implement it in C. For instance BLT provides efficient
"vectors". Bit manipulation is supported. Man expr. Static variables of a
sort should be available with Tcl 8.0, which will support namespaces, which
are better than C's static.
Grant