Better HN
topnewbestaskshowjobs
Log inSign up

pooryorick2

3 karma · joined Feb 24, 2015 (11y ago) · 2 submissions

Submissions

comment 11y ago · link · parent

Are you kidding? Tcl runs circles around JS.

comment 11y ago · link · parent

Funny, I used Python for nearly a decade before ditching it for Tcl, and I haven't looked back. I've used Tcl daily for years now, and haven't experienced the issues you describe. I've never had any more difficulty in Tcl than I had in Python finding the error locus based on error output. On that rare occassion that a brace character conflicts with commenting a chunk of code, some simple idioms come to the rescue. How often do you find yourself commenting out just the first line of a proc definition, not the whole proc? Everything-is-a-string is not any more dangerous in Tcl than any other language, since the same rule-of-thumb, "don't execute untrusted code", doesn't require any more care than any other language. It's also not inherently slow. Look into the the "dual-ported" aspect of the design of Tcl and you'll find a brilliant mechanism that provides everything-is-a-string semantics at the script level while using structured representations on the implementation side.

Uplevel and upvar are powerful, and call for judicious use. People complain about the dangerous things that can be done with them. I find that aspect of Tcl liberating. It gives the script author total control, and the script author is in turn expected to develop the skill to wield the tool.

The world seems to have embraced SQLite. It's less well-known that its author designed it specifically for use with Tcl and is himself a proponent of Tcl.

Tcl is so unique that it's really difficult to discard all the psychological baggage of other language traditions and catch the zen of it. But once you get in the zone, it's a really fun place to be. It's the only language out there that can be anything you want it to be. Someone recently challenged me to make Tcl do this:

http://kazimirmajorinc.com/Documents/Crawler-tractor/index.h...

No problem:

    http://wiki.tcl.tk/40445
    
I've taught both Python and Tcl to kids and teens, and have had had much better results with Tcl. With Python, the lessons have more of a "learn Python" flavour, but with Tcl the flavour becomes "learn programming".