Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is the latest book on Tcl (does not cover Tk) by one of the active members of Tcl community.

The Tcl Programming Language: A Comprehensive Guide:

https://www.magicsplat.com/ttpl/index.html



Excuse me for this kind of question, I'm genuinely curious and don't mean to ignite a flame war.

Is TCL worth studying and using when you can just use Tkinter with Python?


As worth studying as any language is. I think Tcl is really neat and would like to use it more at work, but most software comes with Python API's now, so there is an advantage to popularity. Also, Python has the scientific libraries I need without needing to drop down to C with Tcl. Your mileage may vary. I've used a bit of Tcl for some simple things, but Windows isn't exactly a first class citizen and I don't like how the various distributions of Tcl seem a bit less trustworthy than just downloading a Python distribution from the python or anaconda (scientific distribution) websites.

After reading Ashok Nadkarni's book though, I decided I felt the Tcl design was more coherent to me in a lot of ways. The way it sticks so heavily to commands is very consistent, but languages like Python (or something like APL that goes to the absolute extremes) use special syntax to make certain things easier to recall (think of how Tcl uses "lindex" for accessing arrays and Python has dedicated "array[4]" syntax. Neither is better than the other, just different.

Tcl to me is a lot like a Lisp built off of strings rather than lists. Many on HN will point to how this is inferior, but the overall language and ecosystem has been a lot easier for me to pickup.

Edit: I have nearly a decade of regular Python usage under my built for things like process automation and a little scientific computing, but have only read a book on Tcl, read blog posts, and coded a little bit every now and then.


Most of the modern CAD tools for electronics IC design support Tcl and most of the computer networking companies e.g. Cisco has Tcl built-in inside their devices.

SQlite author is an avid Tcl user and he even introduced a small, secure and modern CGI based web application called wapp:

https://wapp.tcl.tk/home


This is largely a subjective thing, but IMO because of its shellscript-style syntax Tk "feels" better when used with Tcl than Python when it comes to writing quick-and-dirty GUI apps.


You can easily make an executable from a tcl script using Freewrap.

Even with Tk, the overhead is just 8MB.

So distributing a Windows executable with GUI is quite practical. You don't require your user to have anything else installed.


Not sure my info is still up to date, but last time I checked, not all the features of Tk could be accessed through Tkinter. To take advantage of Tk's full power, you have to use Tcl.


I bought this back in ~2019. A very good book, kind of like the old cookbooks, but with more background.


How does that book compare to the third edition of Ousterhout's _Tcl and the Tk Toolkit_? (other than that Ousterhout also covers Tk, obviously)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: