4 ms·
Okay, okay, I'll bite. Hear me, before the rotten tomatoes hit: I. like. TCL. In fact, I'm going to go out on a dangerous limb and say that complaining about t
by meredydd 19y ago
Okay, okay, I'll bite. Hear me, before the rotten tomatoes hit: I. like. TCL.
In fact, I'm going to go out on a dangerous limb and say that complaining about the [expr] syntax - which seems to be his only concrete complaint in the whole article - reminds me of nothing so much as saying, "But Lisp is horrible - look at all those parentheses!"
You've heard the trope that languages, as they get more advanced, begin to resemble Lisp? PG reckons we've seen every other feature but macros, but I beg to differ. TCL is the only other language I've ever used where I could be coding, spot a common pattern, and just define a first-class construct that lets me go:
with-db-transaction conn {
select_1_or_error $conn "SELECT ..."
...
}
Sure, TCL lacks a heap, and garbage collection, which make it untenable for big programs. But if there's one thing Lisp should have taught you, it's that an initially ugly syntax is often hiding something truly golden.
- mechanical_fish 19y agoHave you worked with the ACS (ArsDigita Community System), and/or with AOLserver? Or have you and the ACS simply converged on the obvious idiom? ACS code looked a lot like what you just typed. In the hands of a bunch of Lisp programmers from MIT, Tcl could really be made to sing. It had, at best, the same relationship to Lisp that PHP has to Perl... but IMHO it was a much better Web programming language than PHP, if only because the designers were a bit more careful to avoid inane inconsistencies.
- davidw 19y agoIt's faster than PHP too, or it was several years ago. Rivet blew PHP out of the water in my benchmarks.
- meredydd 19y agoActually, that was a custom app built on the tcl httpd (whose procs-as-paths structure was a revelation to me at the time). I also did some fun things like a Java-style try/catch/finally system, which was useful when playing with xmlrpc. (Plus, the rest of that distributed system is in Java, so it felt like a nice idiom). I gently dispute your "bunch of Lisp programmers from MIT" characterisation - but only gently, because I know what you mean. TCL can give you The Macro Enlightenment (aka, "Oh, that's what 'code is data' means") before ever seeing Lisp - after which, of course, Lisp macros feel conceptually familiar - but the latter is definitely n times more powerful.
- mechanical_fish 19y agoI gently dispute your "bunch of Lisp programmers from MIT" characterisation... You mean as a characterization of you... or as a characterization of the folks who founded ArsDigita, which is what I intended? In either case, a gentle disputation is probably justified. :)
- menloparkbum 19y agoThe reason why ACS was any good was because AOLServer was an awesome multithreaded webserver with a great API. Tcl was only there because it was the easiest language to embed into a multithreaded app at the time (now that distinction goes to lua). I'm not sure the Tcl code in the ACS was a good example of anything... in places it was as bad as the worst Perl script you have seen. (I know, I probably wrote 20% of the codebase.)
- mechanical_fish 19y agoI'm not sure the Tcl code in the ACS was a good example of anything... Pragmatism? And, yes, I understand that nobody really chose Tcl at the time... nor would anyone choose Tcl again. It was more a matter of lemons and lemonade. And not always very tasty lemonade. ;)
- menloparkbum 19y agoI guess pragmatism is valid, but there were quite a few half-baked modules tossed in there just to make it look like the toolkit was more comprehensive than it really was. Also, I think openACS expunged them, but in the initial releases at least 25% of the code was dedicated to Philip's rambling comments about how a particular function would be much more elegant in common lisp.
- mechanical_fish 19y agothere were quite a few half-baked modules tossed in there just to make it look like the toolkit was more comprehensive than it really was. Has there ever been an open source toolkit that didn't look like this? I assure you that Drupal is just the same, only the half-baked modules are numbered in the thousands... Your statement about Philip's rambling comments is both ROTFL-funny and 100% believeable. ;) Hey, just because you're being a pragmatist doesn't mean you can't complain about it at great length...
- menloparkbum 19y ago