|
|
|
|
|
by hn_acc1
376 days ago
|
|
I mean, Tcl/Tk has had this since the 90s. Rewrite your procs (functions) on the fly, delete GUI items on the fly, generate new events, create listeners on the fly, etc, etc. Quite easy to create a GUI that's interactive AND a console you can script on at the same time to inspect / edit / change code. For example, don't like your window attributes? Write code to destroy it, and re-create it and keep your "live" data unchanged, and it will redisplay in the new style / layout. And sure, you could code up atomic transactions quite easily. Itcl even lets you create / add /remove classes or specific class instances on the fly, or redefine class methods. |
|
Tcl isn't as widely known and used as it deserves to be. I think that's in part due to its syntax being sufficiently different from "mainstream" languages. The learning curve isn't particularly steep, but enough so that developers question whether it's worth the effort to go there.
FWIW Tcl 9.0 has recently been released. The language has been enriched with sophisticated object-oriented capabilities, coroutines, full math tower, etc. It's also rather easy to write extensions in C.
Anyway, the GUI toolkit (Tk) has been "borrowed" by many other languages (e.g., Python's tkinter), so quite a few programmers use TclTk, know it not.