Plays well with others

One of aspect's favourite things about Tcl, that he cites to anyone who will listen, is that it Plays Well With Others. This shouldn't be a surprise given JO's original vision for the system as a "Glue language", but how well Tcl succeeds in this respect is really quite a marvel.

Inventory of IPC methods lists some of the ways. Unicode support is still impressive. On Windows there are things like CAWT and TWAPI. Expect is the granddaddy of playing well with others, and still incredibly widely used. Accessing native libraries with critcl or tcc4tcl is almost too easy.

Because everything is a string, conversing with another process is trivial: do as much parsing as you need and no more. Contrast the approach in Lisp or even Python or Javascript where external data needs to be brought into the native world-view (s-expressions, or JSON) to conveniently consume.

For consideration: in how many languages could you consider the below a relatively simple program, requiring only hundreds of lines of code for each feature?

  • presents a simple GUI with some desktop interaction
  • manages a Serial port
  • listens for syslog messages
  • manages a couple of external processes

And then what if you needed to add:

  • wraps a native library
  • provides a simple scripting interface to the user
  • builds and runs as a portable app on multiple platforms