← Back to context

Comment by tverbeure

9 days ago

My experience with Tcl is 30 years of using EDA tools, all of them equipped with this language from hell. Luckily, I've been to restrict the scripting part to the minimum. I'm sure that if you know the language well, you can see the foundational model that's behind it, but for occasional users, there's nothing predictable about it.

I couldn't tell you exactly all the thing that are wrong with it. Let's just say that a language where this is ok:

puts "Hello"

But this is not:

puts "Hello" # A comment

shouldn't exist.

Similar amount of experience with tcl here (since dc_shell-t was released). I love working in tcl. It can be expressive, redable, sufficiently performant, and makes it easy and fast to develop and test new features and functions in even very complex EDA design flows with 100k lines of code.

I find it curious that so many of the criticisms of tcl are that it doesn't have some feature or behavior of some other language. That has never stopped me from accomplishing what is needed with clear, elegant code.

Rule #10 in the Dodekalogue [0] explains why your preferred comment style is not supported: a command is not expected immediately after the last argument of the previous command. Terminate the command per rule #1 and it is perfectly fine:

puts "Hello" ;# A comment

Isn't that the same number of characters one would type to start a javascript comment? //

Almost any programming language can be beautiful in its simplicity if you work with it on its own terms. tcl doesn't deserve the hate.

[0] Dodekalogue is the common name for the twelve rules that define the syntax and semantics of Tcl. https://wiki.tcl-lang.org/page/Dodekalogue