This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Tcl misconceptions


Ian Bicking <ian@bickiia.earlhall.earlham.edu> writes:

> A Tcl program cannot itself manipulate much of anything but strings.
> It is given primitives which allow it to deal with other data types,
> but that's somewhat incidental to the core language.

"Core language"?!  lindex and so on *are* the core language.  I can
see what you mean, though.  

I'm just suggesting that regarding Tcl as all strings, and then
deriving subtle ways of working out what all the strings are and
reducing them to integers/lists and so on is probably overly complex.

It might well be better just to mirror the object representation and
the byte compiler structure of the Tcl interpreter.  Obviously, you
decide!

(As a less important issue.  I'm not entirely sure, but I think Tcl's
lists are actually closer to vectors.  i.e., when I'm writing Tcl, I
assume that lappend, lindex and things are constant in time.  I don't
think that's guaranteed, but it's certainly the case that far more
code uses lappend than uses lreplace (to add items to the beginning of
a list).)