
I can’t believe I’m praising Tcl - fiaz
http://www.yosefk.com/blog/i-cant-believe-im-praising-tcl.html
======
meredydd
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
Have 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.

~~~
menloparkbum
The 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
_I'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
I 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
_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._

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
Yeah, I've worked with Drupal, it is far worse. However, new things like
Rails, Merb, even Django suffer from this far less.

------
systems
Tcl have uniform syntax

Tcl have a small number of basic concept that you can learn in a very small
amount of time

Tcl allow you to easily create new commands that look just like built-in
commands

Tcl have uniform syntax, yes again. I love this about Tcl.

~~~
DocSavage
This excellent article helped changed my thinking about Tcl:
<http://antirez.com/articoli/tclmisunderstood.html>

I had to use Tcl for a large scientific software system and grew to like its
strengths. There's something to be said about an overly simple syntax and nice
coupling to C.

------
ken
So I learned Lisp long before either Tcl or a "pop infix" language. Common
Lisp has it all, and then some.

I learned Python and Tcl at roughly the same time. It looks to me like Python
and Tcl got in a big tug-o'-war fight over Lisp's features, and the rope broke
and each got half.

Python ended up with the data structures, but not the syntax. Tcl ended up
with the syntax, but not the data structures. And advocates on both sides
scream "how can you do anything without #{feature_x}?".

And I say "ah, Lisp has both!", and everybody gets together and says "oh, shut
up, you".

------
astrec
Tcl isn't _that_ bad. We've got a few web apps running quite happily on
AOLServer. In the late 90s/2000 AOLServer was a country mile ahead of
everything else.

------
deathbyzen
Am I the only human being alive that reads articles like these and has next to
no experience programming? I read the whole thing and got the gist of it, but
I'm not a programmer. Still, I find rants, tips, and other things of this
nature enthralling reads.

~~~
donal
Be careful!

That might lead you down the path of <gasp> learning to program, or worse
liking programming, or even worse yet changing jobs so that you program full-
time.

Pretty much the path I took. Though, seems to be working out, particularly
with some startup plans slowly taking shape.

------
tptacek
Tcl had a bunch of things going for it that made it an excellent embedding
language: a lightweight runtime, simple, consistent semantics, and (for the
time) an excellent C API.

------
jcl
If you'd like Lisp without parens, how about Logo?

Logo seems like Forth backwards: prefix instead of postfix; neither language
needs parens for function calls because they both know how many arguments each
function call uses.

------
ojbyrne
I think I judge languages by slightly different criteria from the rest of the
people here. Tcl got me 2 jobs. So I can't help but praise it.

