4 ms·
Tcl is a strangely beautiful language. For those who haven't tried it, it's a little bit like Lisp (minimal homoiconic syntax, code is data) but without closure
by sstephenson 16y ago
Tcl is a strangely beautiful language. For those who haven't tried it, it's a little bit like Lisp (minimal homoiconic syntax, code is data) but without closures. Which of course sounds awful until you realize you can implement lexical scoping with the [uplevel] command: https://gist.github.com/874370 https://gist.github.com/874370
It's also very easy to embed a Tcl interpreter into a C program, or into a Tcl interpreter itself via the [interp] command. And asynchronous I/O is baked into the standard library.
If you're interested, the Tclers Wiki (http://wiki.tcl.tk/ http://wiki.tcl.tk/) is a great place to learn more about the language.
- mhd 16y agoTcl seems a bit in a slump nowadays, but I don't think it would need much to get out of it. With a nice interface builder or some "automagic" layout classes the GUIs could be up to par again, although that's probably not even the most important aspect right now. Probably the biggest part missing are packages. TEA isn't that bad, but compared to Eggs/Gems/CPAN it's a bit lackluster. Although this is a bit of a catch-22, I guess. Hmm, was thinking about what language to use for my next project. Wanted to go with Python, but I think I'll give my old Tcl muscles a good workout again. Had much fun using it in an industrial context, let's see how much hurdles I have to jump for a current web project...
- gaius 16y agoIt suffers a bit from public perception as being "old" but of course it's up there with all the modern features, it's exceptionally easy to learn and use, there are no surprises or special cases. Probably because Tcl/Tk attracts the sort of programmer who happily uses it for real work and doesn't spend much time on advocacy forums...
- dexen 16y agoSeconded. My first (and only to date) serious encounter with Tcl was when writing some `expect' scripts. The language is flexible and powerful. It's quite easy to pick up the basics and become productive. Tcl is pretty good with GUI -- for example, Git's gui (`gitk' and `git gui') are implemented in Tcl with Tk library. By default it looks very plain, but is of course skinnable. NB., `expect' is a great way of automating CLI interaction with remote devices during development and testing. In a way `expect' reminds me of Awk -- `expect' is data driven as well, actions are attached to specificators of input conditions.
- peterbotond 16y agotcl info var and a dict can do closure like constructs. 8.5. 8.6 has a really cool oo interface. http://tcl.activestate.com/cgi-bin/tct/tip/257.html http://tcl.activestate.com/cgi-bin/tct/tip/257.html i do not know lisp, yet i heard tcl is like lisp without the strong type checking.