Why is tcl broken?

Lars Marius Garshol larsga at ifi.uio.no
Tue Jun 29 19:02:42 CEST 1999

* Cameron Laird
| As it happens, there's very good work going on just now to beef up
| Tcl's introspective capabilities.  Is *that*-- introspection--the
| real content of your preference?

I don't know exactly what Marco had in mind, but this is certainly not
the main value of the Common Lisp macro facility. The main value lies
in being able to extend the language seamlessly with no run-time costs.

Things like the while loop (which does not exist in CL), the Common
Lisp Object System and programming by contract features can be built
on top of the Lisp core using nothing but CL primitives. Personally, I
dream of finding the time to toy with Aspect-Oriented programming in
CL through extension macros.

I know tcl has a similar capability, but I'm unsure whether it is of
comparable power and convenience. 

[From your first posting in this sub-thread]

| Are you making a semantic point, or arguing on the basis of
| implementation-specific performance?

Is there more than one implementation of tcl? If so, does any of them
do macro expansions at compile-time? If not, I think arguments based
on performance also carry considerable weight.

I doubt that you would disagree that C++ has better performance than
does tcl. Given than CL achieves comparable performance to C++ a
conclusion seems near at hand. :) 

(BTW, I don't know if you're aware of this, but Dylan, which you wrote
an excellent article on[1] is essentially Common Lisp bereft of one of
its major features, the S-expression syntax.)

| Incidentally, many of the same ideas and possibilities are available
| to Python, although I don't know of anyone actively pursuing them
| for Python.

Actually, macros, performance and S-expressions are among the things I
miss the most in Python.  bytecodehacks, although certainly cool, are
just a pale shadow of what CL macros provide.

As for introspection, Common Lisp has good support for that as well,
although I very much doubt that that was Marco's point.

| [...] I occasionally argue that 'twould be worth the effort to do
| introspection for Python in a more unified way.

'twould indeed, but I find other issues more pressing.

--Lars M.

[1] <URL: http://www.sunworld.com/swol-03-1999/swol-03-regex.html >

More information about the Python-list mailing list