Hacker News new | ask | show | jobs
by embedding-shape 12 days ago
I've only used Tcl briefly, mostly for automation which it's great at. But it's a Algol-like imperative language, doesn't have any type of macros and makes everything based on strings (which makes sense for automation) instead of lists, with all the tradeoffs that comes with.

It seems easier to figure out what the similarities are, because I think they're pretty few, they seem to differ more than they are similar.

2 comments

Tcl is pretty good at functional-programming type stuff, and it can absolutely do anything that you could do with a macro. It isn't Algol-like at all imo, maybe beyond some superficial syntax. It feels a lot more like if LISP and Bash had a baby out of wedlock.

(I've written a lot of Tcl over the years and it'll always have a spot in my heart)

Tcl being based on strings creates the same problems like in bash scripts, i.e. it is too easy to misuse the quotation rules, leading to subtle bugs.

Using for scripting LISP-like languages is much more foolproof, especially for more complex scripts.

Ok, but now I want to embed Janet in a TCL program