Wednesday, April 14, 2010

The Tcl War

Weird thing came up twice on the web in the past two days. First was a search for "Tcl nntps", the second was on Reddit.

I've always been an admirer of Richard Stallman. Although I prefer vi to emacs, and GNU Hurd seems like total vaporware, you have to admire the impact Stallman has had, and his consistent application of his values.

But now, I'm afraid I will have to charge him with heinous war crimes against humanity!

His objections are pretty weak (no linked lists?, slow adds?). And to suggest Lisp as a replacement is just silly. Tcl syntax is weird, but Lisp (from Wikipedia)?

(let loop ((n 1))
(if (<= n 10)
(begin
(display n)(newline)
(loop (+ n 1)))))

I have no idea what that does. I think it prints the numbers one to ten...
In Tcl:
for {set i 0} {$i <= 10} {incr i} {
puts $i
}

A lot closer to C. Actually, Tcl has gotten a lot easier for me once I started thinking of it as a prefix type language (like Lisp). Just with [] and {} instead of ().

No comments: