4 ms·
It's really sad that Tk has gotten a lot less love in recent years. With the advent of multi-megabyte UI frameworks (one is named for a subatomic particle), we
by vincent-manis 2y ago
It's really sad that Tk has gotten a lot less love in recent years. With the advent of multi-megabyte UI frameworks (one is named for a subatomic particle), we have forgotten the benefits of a small, well-documented UI interface that is highly portable across OSes and architectures, and whose API can be invoked from virtually any language, with only a thin wrapper (I routinely use Tk from Scheme, for example).
Yes, Tk UIs nowadays look kind of clunky, and they don't cover the entire span of things that a UI should manage. Neither of these is a fatal flaw; if somebody wanted to put in a small amount of money, both could be easily addressed. Since there is apparently no prospect of this happening, I expect Tk to fall further and further behind. Shame.
- ofalkaed 2y agoTk has native look and styles and themes these days, perhaps not for Scheme? https://tkdocs.com/tutorial/styles.html https://tkdocs.com/tutorial/styles.html Personally part of what drew me to Tk is the old clunky aesthetic which ended up freeing me from fighting the QT or GTK or what ever aesthetic which tends to work against the things I want to do and caused me endless grief. Tk just works for me and I can mostly forget about themes, just make my UI and get on with it.
- vincent-manis 2y agoI should have mentioned the themes, I agree they're an advance. But some people like really flashy UIs, some of which might not be easily achievable with Tk. I too tend to like retro UIs, and everything I want is achievable in Tk. Re Scheme: you can do anything in Tk from Scheme as in any other language, if you're willing to use the Tcl (text-based) interface, as I do. The ease of interfacing to Tk via Tcl is one of the things I like most (I imagine somebody could do it from Cobol!), although there is a C interface as well. I'm not particularly fond of Tcl as such (though one year I used it in the software engineering course I used to teach), but the integration of Tcl and Tk is a thing of beauty.
- ofalkaed 2y agoTk is definitely not for flashy UIs but I don't think it should be called clunky anymore. I loathed Tcl until I started into Tk, still causes me some grief but as a hobbyist the headaches of Tcl tend to be considerably smaller and easier to solve than the headaches of things like QT, wxWidgets, etc or even Tk from another language, which all left me spending more time looking for answers than programming. Tcl is growing on me, it and Tk are small enough that I can actually learn them well (at least well enough that I can generally answer my own questions), which is a huge plus for those of us who are learning to program in our freetime for our own projects. I can see why the professional programmers tend to push against them, there are better alternatives to Tcl these days and it will not be easy to create those flashy professional looking applications which draw in the consumers with Tk. Very much function over form here.