3 ms·
I really like Tcl/Tk, and I hope anyone wanting to hack together a quick GUI interface gives it a try!
by wsprague 17y ago
I really like Tcl/Tk, and I hope anyone wanting to hack together a quick GUI interface gives it a try!
- gaius 17y agoTcl is an incredibly underestimated language. The Ruby guys go crazy for Shoes; Tcl/Tk had Starkits years ago which do way more. Concurrency is all the rage - see how efficiently the Tcl VM can run as many interpreters as you want (tho' you can have threads if you want them too), forget Python's GIL. The Lisp crowd talk about macros as their killer advantage - Tcl makes adding new constructs trivial (everyone implements their own do...while in a few lines of code). Distributed computing - Tcl securely exchanges Tcl scripts as easily as data, send some processing off and get it back, or build a rich GUI control on the fly and send it to someone's screen, it'll run there and send only the data back to you. I never understood why Tcl wasn't wildly popular. Even now it suffers from a reputation as an "old" language, when its VM is up there with the best of them.
- davidw 17y agoBad marketing, mostly. But that's another topic for another time. Suffice it to say that wondering about that very thing helped me to learn a lot about marketing and economics.
- makecheck 17y agoI think Tcl is ideal for writing domain-specific formats, e.g. file formats that require a few custom constructs but would still benefit from essentially an entire programming language to help with specification. I also think Tk is a major strength, though I always preferred Perl's interface to it. Despite these strengths, I don't like Tcl as a language. It's not that its syntax isn't without certain charms (brevity being one), but it has a few flaws that I consider fatal: 1. It is far too easy to make the mistake of inlining a list. This can result in arguments being passed in the wrong order, or partial lists being processed when it "seems like" the whole list has been read, etc. This is a very hard problem to debug. 2. The Tcl interpreter does not trace blocks very well. It usually points you to the line of the last curly brace in a half page of nested constructs, which tells you almost nothing about where an error is. 3. While it's very easily bound to C, it has no concept of objects. So Tcl APIs seem to require constant re-querying; for example, rather than "set x [expensive_get_operation a b c]" followed by "[x do_y]" and "[x do_z]", APIs tend to look like "[expensive_y a b c]" and "[expensive_z a b c]". All other advantages to objects are, similarly, lost. Of course, Tcl has been evolving fairly rapidly lately, and 8.5 addressed a number of serious annoyances. Maybe my perception is out of date; if so, please enlighten me.
- davidw 17y ago8.6 includes some OO stuff: http://www.markroseman.com/tcl/guide86.html http://www.markroseman.com/tcl/guide86.html And of course, different OO systems have been available for a while. One of the 'bad marketing' points is that having different, competing, not-installed-by-default OO systems available might be fun for people to play with, but is not fun for end users who just want to pick one and be done with it.
- systems 17y agoTcl has its faults. 1) Poor DB support (TDBC is very young with so few drivers) 2) No CPAN 3) Poor support for web-development 4) Poor support for advance programming constructs 5) Dry community Its not just Marketing, Tcl is just not as exciting as Haskell, Erlang, Ruby or even R!
- davidw 17y ago> ... marketing ... exciting That sounds exactly like a marketing problem. The other things are actually technical problems that are more or less correct, but that haven't necessarily stopped other languages from doing ok. I mean, look at Erlang, for instance. It does a few things very well, and other things in it are fairly ugly. And yet, warts and all, it's certainly worth studying, and utilizing for certain classes of problem. Another example: Tcl has more or less got i18n/unicode/utf8 and threads right for years, whereas Ruby has struggled with those same issues. Every language/implementation has strengths and weaknesses, and part of what 'marketing' is, is getting the language into the hands of people who will do well with its strengths, and also gathering data from the 'market' in order to determine what needs improving/fixing. BTW, the Tcl community is excellent. Very friendly people, very welcoming and approachable.
- gaius 17y agoIn many years of Tcl point 1 has never been a problem - TDBC is new but Oratcl and Sybtcl have been around for a long time and are rock solid. 2 no comment, 3 may be true now but Phillip Greenspun managed to build his business around it, 4, can you provide an example? 5 only in the sense that they don't blog much.