3 ms·
Another excellent aspect of Tcl I found is extensibility of JO's C implementation. At some point I needed to write some native code for speed and making this v
by foobarian 2y ago
Another excellent aspect of Tcl I found is extensibility of JO's C implementation. At some point I needed to write some native code for speed and making this visible to the Tcl interpreter was a pleasure. Plus the codebase is so clean and well written.
- davidw 2y agoYes! Tcl's C code is a real pleasure to work with and extend. I got to write some of the updates in this 2nd edition regarding the C interface: https://www.oreilly.com/library/view/tcl-and-the/9780321601766/ https://www.oreilly.com/library/view/tcl-and-the/97803216017...
- musicale 2y agoI also recall appreciating Tcl's C code.
- pjmlp 2y agoWhile I agree, it was what eventually made us move into .NET, and the founders of the startup I started in 1999, eventually went on to create OutSystems. Too much code being rewriten from Tcl into C for performance and scalabity reasons, and it still doesn't have a proper JIT. Now as a way to script C code, it is even easier than CPython.
- f1shy 2y agoI've not seen the code, but the author has written a book [1] which has the advice I've ever seen. Much better than "Clean code" and other books in that direction. So it does not surprise me that the code is so well written. [1] https://milkov.tech/assets/psd.pdf https://milkov.tech/assets/psd.pdf
- 082349872349872 2y agoI'm pretty sure Ousterhout intended for people to write a few deep modules in C and only use Tcl to glue everything together/provide extensibility. (we did exactly this for networking code about 30 years ago: C for the data plane and Tcl for the control plane. That architecture remained in service for decades.)
- johnisgood 2y agoI agree, I have modified Tcl's codebase, too, to suit some of my needs (I wanted to use Tcl as my shell).