Hacker News new | ask | show | jobs
by jrapdx3 108 days ago
Probably not what most on HN would think of, but for writing a simple app with a GUI, I'd suggest that Tcl/Tk is hard to beat. Of course the simple approach wouldn't suffice if the program had to be compiled to a native binary. Though Tcl/Tk has an excellent C API, so a binary version of the app could be built if considerably more work to accomplish.
2 comments

I second this, Tcl is a lovely language in general and quite lisp like. One of the nicest and most unexpected experiences was learning it last year. Tk is then trivial from Tcl, with nice native GUIs being 15 mins away.
Yes indeed, I concur completely with your comments. I've used Tcl/Tk for a few decades and for a long time enjoyed it's Lisp-like character. Of all GUI toolkits Tk is by far the best thought out, no wonder it's been adopted by a number of other languages.

Tcl does have a few disadvantages, for one the lack of distinction between string and list types makes certain programs hard to write. Also the absence of lexical environment for the apply command requires awkward workarounds. Many Tcl users dislike expr syntax.

Warts notwithstanding, Tcl has allowed me to be very productive. Over the years it's been steadily improved, and yet remains mostly compatible with code written even decades ago. That's a rare accomplishment in the programming universe.

I tried Tcl/Tk back in 2005 and abandoned it in favour of Qt/QML (and much later Flutter), mostly because UI was so bloody ugly it was embarassing to show to any other user except myself. Has anything changed since then?
AFAIK the answer is an emphatic yes, a lot has changed since 2005. Tcl9 was recently released and has many new features. As far as Tk goes, for a number of years we've had "themed Tk" or Ttk widgets, much better styling, resembles native widgets quite closely. Ttk widgets aren't as configurable as regular ones, well, everything has tradeoffs.

You should take a look at the current releases, you might be pleasantly surprised.