3 ms·
While TCL is definitely an odd language, with plenty to alienate the modern programmer, there are some killer applications for it. For me the thing that sucked
by jascii 6y ago
While TCL is definitely an odd language, with plenty to alienate the modern programmer, there are some killer applications for it. For me the thing that sucked me in was tcl/expect a simple but powerful tool to control CLI's. At one point in my life I was tasked with managing over 3000 various network devices, I couldn't have done it without TCL/Expect!
- cmacleod4 6y agoI'm the blogger here - I think my main point is that the perceived oddness is inextricably linked to Tcl's strengths.
- jascii 6y agoI think that goes for a lot of languages that are now often considered "odd". There is something about how an elegant and simple paradigm can help you think about a problem! The first "higer" language I ever learned was Forth, and I never quite got to terms with infix notation, so I might be biassed ;)
- ci5er 6y agoThat's a great point, and after re-reading your blog-piece, I'm not sure that point came through so clearly as you just declared it here. A LONG time ago, I used to use it (tcl/tk) to do quick-and-dirty apps on X-windowed Unix boxes and port them to Windows without really knowing much about Windows. (That was handy!) And Expect blew me away back in the day of distributed systems management (I'm more of a programmer than a sys-admin, so I guess it would even be more important to those folks?). The whole "There is no math, only strings" thing, still irritates me to this day, but I suspect you are right - this might be tied to the simplicity and strengths. IDK. Food for though. Interesting piece. I think that I'm the only person I know that still dabbles in TCL after about 15~20 years ago (maybe I need to get out more), but it certainly rocks where it rocks! It is always surprising and pleasant to see a modern piece on it.
- ufo 6y agoWhat made Tcl click for me was thinking that it is basically shell/Bash, except that it's a coherent and sensible design. Just like an unix shell, everything is a string and you don't need to use "double" "quotes" "everywhere" "like" "this". However, in almost every part of the language, the way that Tcl does it is saner than the way the unix shell does it. The infinitude of footguns of Unix shell make us discount it as a serious programming language but Tcl shows that it doesn't have to be that bad :)
- a1369209993 6y agoTBF, half of the supposed footguns are people not understanding the difference between a command shell and a scripting language and trying to write code as if they were using the latter[1], and the other half are defects of specific shell languages rather than shell programming in general[0], but the lack of a decent implementation kind of hamstrings the latter defence. 0: There is no reason why a shell couldn't fix bugs like: $ echo "$X" * $ echo $X foo.txt bar.mp4 it's just that none of the common ones do. 1: especially the incessant stupidity about adding type information to pipes, as if grep were a function rather than the arbitrary binary file /bin/grep
- fanf2 6y agoThe Plan 9 `rc` shell is a bit neater than typical Unix shells
- J-Kuhn 6y agoIf you want to automate stuff on windows with tcl, twapi is great. I prefer Tcl with twapi over AutoHotkey.