Hacker News new | ask | show | jobs
by tyingq 3715 days ago
There are things to like about tcl, but lists aren't really one of them.

Not cherry picked, an "official" page describing lindex: http://wiki.tcl.tk/1481 Objectively compare that with most any other language's docs for lists/arrays/whatever. "Everything is a string" does have some downfalls.

1 comments

I think you might have misinterpreted my point. When I said it was cherry-picked, I did not mean that it wasn't a legitimate example or that lindex is not a real, standard Tcl function. It's a completely fair example and is something that is liable to happen in practice.

All I meant is that it was clear from the context that an example was chosen showing a weakness of the language (relative to standard C-like syntax) and that it's not quite fair to judge the whole language based on that one example.

Tcl's incredibly simple syntax and lack of syntactic sugar are what lead to situations like that example. But those same things are also responsible for making the language Lisp-like and fairly homoiconic. You can do incredible things in Tcl thanks to its simple syntax which is amenable to macros and code generation.