Ask HN: How popular is Tcl in 2024?

5 points by tpoacher ↗ HN
Every now and then I come across comments that talk about Tcl, and they're always very positive. (last one I bumped into, here: https://news.ycombinator.com/item?id=41105139)

I've always had Tcl on my list of languages to learn "when I have some spare time", but there's always something 'better' to learn instead, so I haven't done it yet.

How relevant / popular is Tcl in 2024, really? Is it a language still worth learning in 2024? Can someone who is into Tcl and thinks so convince me that it's a language worth learning?

7 comments

[ 2.9 ms ] story [ 28.8 ms ] thread
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/

So it's hard for me to recommend tk for GUI development.

>> 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) 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

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.

You 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. :)

Interesting, 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 ...