Hacker News new | ask | show | jobs
by jcfields 1831 days ago
I haven't used Tcl for anything in ages, but I have a book on it that I thumb through sometimes because it's so bizarre and fun to read about.

For example, you can delete or rename procedures on the fly, including built-in procedures. So you can rename a built-in like puts to something else, create your own puts procedure, and then call the old one (under its new name) in your new procedure (in case you wanted to override it to do some pre- or post-processing each time). You can even redefine procedures within themselves.

You can use variables in variable names (PHP does this as well).

The comment character # is a valid name for a variable or a procedure.

"Everything is a string" extends to even lists and code blocks.

Even though we've moved away from the hyperflexibility of languages like Tcl and Perl, they certainly served their purpose, and a lot of their better ideas were refined in their more orderly successors.

1 comments

>$your_entire_comment

upvar

Expect & children (& see Don Libes book)

>a lot of their better ideas were refined in their more orderly successors.

Predecessors:

- ???

- Smalltalk

- Forth

- Lisp

#Not a language lawyer, just love proglangs