Why is tcl broken?

Paul Duffin pduffin at mailserver.hursley.ibm.com
Thu Jul 1 12:07:06 EDT 1999


Marco Antoniotti wrote:
> 
> jenglish at flightlab.com (Joe English) writes:
> 
> > Marco Antoniotti wrote:
> >
> > >BTW. Is TCL statically or dynamically scoped?
> >
> > Neither, really, since Tcl doesn't have nested procedures, lambda
> > expressions, "let/letrec", local bindings or the like.
> >
> > I'd describe Tcl as "namespace-scoped": there is an open-ended set
> > of top-level "namespace" environments, plus a distinguished "global"
> > environment.  In addition, each Tcl "proc" has its own local environment,
> > into which variables from other environments can be explicitly imported
> > via "variable", "global", explicit namespace reference, or "upvar".
> > "upvar" gives you something *sort* of like dynamic scope, but not
> > exactly.
> 
> Now, who was saying that Common Lisp macros are a source of
> inconsistencies? :)
> 

I was referring to the fact that CL macros 'complicate' the parsing /
evaluation rules of Lisp which otherwise would be very simple and
consistent.

I personally like Lisp a lot and take advantage of lots of short cuts
that macros provide but I think that there is a big learning curve to
climb if you want to write one yourself (which is why I referred to it
as another language). Tcl on the other hand allows me to use the same
commands that I use to write normal programs to extend the language by
adding new programming constructs.

Like macros / loathe macros is a subjective thing and probably changes
with your experience of them.

-- 
Paul Duffin
DT/6000 Development	Email: pduffin at hursley.ibm.com
IBM UK Laboratories Ltd., Hursley Park nr. Winchester
Internal: 7-246880	International: +44 1962-816880




More information about the Python-list mailing list