4 ms·
The Tcl shell itself (tclsh, which is many people's only interface with Tcl) is just a REPL that uses libtcl. The Tcl library is written in C, and built to be e
by bch 11y ago
The Tcl shell itself (tclsh, which is many people's only interface with Tcl) is just a REPL that uses libtcl. The Tcl library is written in C, and built to be easy-to-use and powerful. Tcl also has an incredibly stable API/ABI which allows for a "stubs mechanism"[0] which is quite a nice, powerful facility that allows for seamless fixes to your Tcl-dependant work.
[0] http://www.tcl.tk/doc/howto/stubs.html http://www.tcl.tk/doc/howto/stubs.html
- srean 11y agoGreat points. Something I feel that Tcl really got right and Python did not is handling concurrency. The Tcl way is to run the different interpreters in different threads and communicate between them by message passing but without the need for serialization - deserialization. They had this from the very beginning.
- bch 11y agoYes. For multithreaded code, instead of deciding where/how to put interpreter locks (like Python's infamous GIL (global interpreter lock)) to manage low-level sanity wrt sharing data, Tcl punted and lets each interpreter run unfettered. This is called apartment model [0] threading. [0] https://msdn.microsoft.com/en-us/library/aa261361(v=vs.60).aspx https://msdn.microsoft.com/en-us/library/aa261361(v=vs.60).a... (this is a Microsoft VB article, with nothing to do about Tcl specifically, but does nicely explain the apartment threading model) Edit: s/let's/lets/