logoalt Hacker News

neilv • today at 8:17 PM • 3 replies • view on HN

The biggest early selling point of Tcl was Tk, as a relatively easy way to make good-enough GUI programs with open source on Unixen and the X Window System. Even much easier than the easier-to-use X toolkits like XView with C, and the alternatives only got more difficult from there. There were no Web frontends.

Tcl itself was quite clever as what I'd actually call a string-based scripting language (contrast with Bourne/C-shell/etc. that preceded it on Unix).

Originally, Tcl was among the handful of off-the-shelf extension languages. You write your big application in C or C++, and then you embed an interpreter for a higher-level extension language, for users or the original developer to add on functionality. The options at the time were usually a small Lisp/Scheme, Tcl, Python, or something entirely bespoke and probably quirky and half-butted.

During early dotcoms, there was considerable interest in Tcl for backend work, and it also wouldn't have been the worst choice to put into the browser. Like Python, Tcl would've been more accessible and democratizing-the-Web than JavaScript, and there were already solid off-the-shelf designs and implementations. (Scheme would've appeared slightly more intimidating than Python or Tcl, and was more powerful, which I think was why Tim Berners-Lee preferred Python over Scheme as the people's programming language for various Web purpose. The semantics of the JavaScript we got was more a hurried toy Scheme, plus the simplest object model, and a more intimidating syntax that came from systems programming.)


Replies

monista • today at 10:09 PM

> The biggest early selling point of Tcl was Tk

You're not that old, are you? :) Before www, expect was the way to go.

<https://en.wikipedia.org/wiki/Expect>

flopsamjetsam • today at 9:24 PM

My pet project in those days was writing a C++ X-Windows gui toolkit, and I took a lot of inspiration from Tk. Both design, and "how do I do this" from the source code were invaluable.

Didn't Cisco use Tcl in one of their IOSes? Found it: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/co...

giancarlostoro • today at 8:24 PM

I think some of the "LAMP" type bundles use Tcl/Tk for their UI, kinda neat.