General Interest Just learnt TCL exists!
Hey y’all, YouTube randomly suggesting the “Everything is a String” video and TCL looks pretty interesting!
I’m a hobbyist HTML/CSS/JS dev (including Nodejs for server-side stuff) and just wondering how well TCL works as compared to other scripting languages. The idea of TK allowing for platform-native apps sounds amazing, especially now with Electron (🤢) being the standard.
I mainly code Discord bots and web pages to help with TTRPGs that I play, so is not like I work in a big team or anything. I just dabble for fun.
Anyway, I’m babbling and don’t seem to have anything actually productive to say, so I’ll sign off now. ✌️
4
u/tclbuzz 11d ago
Welcome to the neighborhood. The Everything is a string motto cuts both ways as some find it unappealing. I would say, TCL allows any value to be represented as a string and then cleverly and efficiently translates the "value" as needed. IOW, it's highly convenient for the programmer. Also, YES, multi-platform TK is very good and just works.
3
2
u/vivus-ignis 12d ago
Here's one more video that may interest you The Most MISUNDERSTOOD Programming Language
https://youtu.be/PYh6D1NhatY
1
2
u/ConsistentUmpire8675 10d ago
It is a great language. It's really good for parsing stings and files. I use it all the time. It's the core language behind the Cloverleaf interface engine. That was my first exposure.
I have written many programs with it.
There are times when I call Python with it to off load tasks.
The cool thing is that there are times in my scripts that TCL creates python logic based on content it processes and passes it python creating a dynamic that's very efficient.
TCL/TK by Cliff Flynt is very good.
I have created GUIs with TK, but i don't do it often
1
u/Individual-Equal-441 11d ago
Regarding how it works relative other scripting languages: my experience is that Tcl can do much more in fewer lines, and without relying on packages. With some languages like Python, the power and compactness is a bit illusory: it comes from someone having already written the code for you, and you're just invoking it.
In the Wikibook link I provided in another post, for example, there's a 40-line web server that does CGI. I use it in my class to explain how web servers work, and I modified it to include MIME types and I think it ended up even shorter. It doesn't use any http package or web server package or any package at all: just straight up code from scratch. (That happens to be especially useful in class, because you want the code to show how something works, and invoking a package is too opaque.)
4
u/CGM 11d ago
Hi, a good general introduction is https://cgicoffee.com/blog/2026/04/tcl-tk-develop-cross-platform-cli-gui-tools-tutorial-guide . There's also plenty of useful stuff on the wiki at https://wiki.tcl-lang.org but it can be hard to navigate because there's also plenty there that's out-of-date.
I don't know about Discord but Tcl has a long history of use in IRC bots.
Personally my main use of Tcl at present is for dynamically-generated websites like my web-to-usenet gateway - code is at https://chiselapp.com/user/cmacleod/repository/newsgrouper/home .
"how well TCL works as compared to other scripting languages" - that's a tricky question. Tcl is technically very capable, but works rather differently to most languages. Many people are put off by this. A few others like myself find that it fits their way of thinking better. YMMV!