3 ms·
Tcl is like a Lisp where space-separated strings take the place of S-expressions. Thus I like Tcl a lot fundamentally and think it's an interesting language, b
by PaulHoule 2y ago
Tcl is like a Lisp where space-separated strings take the place of S-expressions.
Thus I like Tcl a lot fundamentally and think it's an interesting language, but it doesn't have the huge library that, say, Python or Clojure have so I don't see myself really using Tcl much. I think Lua stole a lot of Tcl's thunder as a language that's easy to embed in a bigger application. (I remember talking w/ someone who chose Lua over Tcl as an extension language for a big FORTRAN program in the 1990s)
The tk UI toolkit was the Unix answer to Visual Basic, it's very easy to code up little GUI applications if you don't care what they look like. If you do care what they look like you can improve things with more work but a tk app will never look great compared to a 2024 Electron or WinUI app.
One thing I found out is that unlike modern UI frameworks, tk does not do color management. I have a monitor which is more-or-less AdobeRGB and when I display an ordinary sRGB JPEG it is the job of the application to give Windows the image in the color space of the monitor. tk has no conception of this so the sRGB goes out to the monitor and is displayed as if it was AdobeRGB. Other modern features such as accessibility are missing
https://sourceforge.net/p/tcl/mailman/message/36955189/ https://sourceforge.net/p/tcl/mailman/message/36955189/
So it's hard for me to recommend tk for GUI development.
- thesuperbigfrog 2y ago>> So it's hard for me to recommend tk for GUI development. Tcl/Tk is widely used in lightweight legacy GUIs. Python distributions will typically include tkinter (https://docs.python.org/3/library/tkinter.html https://docs.python.org/3/library/tkinter.html) which is just a Python wrapper for Tk. Git usually includes the gitk graphical utility which is written in Tcl/TK: https://github.com/git/git/blob/master/gitk-git/gitk https://github.com/git/git/blob/master/gitk-git/gitk It's probably in use in other places, but those are two that quickly come to mind. I agree that Tcl/Tk is probably not an ideal choice for new projects, but it has a long legacy, is quite stable and likely to be around, largely unchanged, for some time to come.
- kazinator 2y agoYou know you've stepped into one of these when you select a region of text and then paste, naively expecting the selection to be replaced by the paste, like in everything since the 1984 Apple Macintosh. Yeah, git gui user here. :)
- kazinator 2y ago> Tcl is like a Lisp where space-separated strings take the place of S-expressions. https://en.wikipedia.org/wiki/Mocklisp https://en.wikipedia.org/wiki/Mocklisp
- tpoacher 2y agoInteresting, thanks for the insight. Lua was also on my 'list', but admittedly further down. I would not have thought of this link between the two. If I ever do decide to byte the bullet, it might be interesting to learn these two side-by-side ...