Re: Why Tcl is a Bad Thing

Tom Tromey (
08 Oct 1994 16:04:48 GMT

>>>>> "Robert" == Robert Sanders <> writes:

>> In article <1994Oct8.040610.22152@chemabs.uucp>,
>> Larry W. Virden <> wrote:

>> in Tcl itself. Some folks have commented on the lack of Lamda functions,
>> yet there have been several Tcl code implementations of this type
>> of function.

Robert> Lambda functions aren't worth nearly as much if you can't get full
Robert> closures. Did those extensions allow you to create functions closed
Robert> over a set of bindings?

No, you can't get closures. You can fake them to some limited degree
by substituting at lambda-creation time.

I've written 3 different versions of "lambda" for Tcl. They all suck.
I don't use any of them. The rundown:

* One implementation never "gc"d the anonymous functions it created.
This is horrible.
* One implementation subjects you to quoting hell, because you need to
pass names that look like [Lambda ...]
* One implementation has real performance problems, because it creates
a new proc and then deletes it every time a lambda is evalled.

I would say that you can't really do anonymous functions in Tcl. I
generally just use lots of small throwaway functions instead.


--                Member, League for Programming Freedom
"Sadism and farce are always inexplicably linked"
	-- Alexander Theroux