3 ms·
Reading the calc app reminded me of tcl/tk
by xyzzy123 11y ago
Reading the calc app reminded me of tcl/tk
- lmm 11y agoTCL is a very elegant language that combines many lisplike properties with a healthy dose of pragmatism. But somehow it never gets any respect.
- eggy 11y agoI just picked up the book "Tcl/Tk: A Developer's Guide" by Clif Flynt. I see Tcl/Tk in PureData, Pd, that I am using, and so many other apps that I decided it was worth learning. The short code examples were also enlightening. I have used it so far to write some utilities on Windows that I would have used Powershell for, but now I can use them on my Linux partition too. And the Tk widgets are not as bad as the press they get, especially for personal, rather than distribution to the 'design' saavy ;) I like it so far.
- qwertyuiop924 11y agoWeirdly, everybody whines about the different quoting mechanisms and the use of upvar and uplevel in TCL. Coming from scheme, it's a breath of fresh air: Macros are no longer a special class! everything is unified! Sure, you lose some abstraction power with the quoting, but that's AWESOME! And if you're wondering why lisp didn't do this, it used to, in the form of fexprs. Although there was never any equivalent of uplevel, AFAIK. Some lisps, like newlisp (which thinks we'll LOVE solving the funarg problem again) and picolisp (which also has a version of uplevel, but apparently thinks that alists are an acceptable replacement for hashmaps and other data structures, so fuck that noise), actually still have this, but it lost favor in the mainstream, partly due to the Wand paper, which proved that it makes many common compiler optimizations impossible.
- makecheck 11y agoI don’t like TCL because it can be extremely hard to debug and cause fatal errors very late in the game. Since both "varname" and "$varname" can appear almost anywhere, it is very hard to conclusively tell where something is used (or even if what you see is a mistake). What’s that, you have a 1.5-hour job that died because of a TCL syntax error, because TCL can’t parse far enough ahead, and the stack trace is useless? Par for the course.