
Dear Sean,
In message 43880bf0-baa6-0cb2-80fe-0fe50d43b42f@gmail.com you wrote:
Tcl is a horror of a language for anything that is above trivial level.
Can you please elaborate on this? You've made this claim several times, but haven't explained your reasoning for it.
A long, long time ago I I was looking for an efficient way to do regression testing for embedded systems, mainly U-Boot and Linux. I found GNU gnats to bee too difficult to handle und started writing my own test system (you can still find this ancient stuff here [1]) based on expect/Tcl. At that time, I could not find any other solution, so I had to accept Tcl as programming language for this tool. And at the beginning it usually worked just fine. Mostly. Coming from a C programming environment I always found Tcl ... strange. For example it's scoping rules (see [2] for an example). Things got worse when the system grew and we had to deal with strings or parameters which might contail quotes or other special characters. This required fancy quoting, which depended of the calling depth - if there was only on specific level. you might find a solution after some (cumbersome) experimenting. But if the same string was used in several places in the code, and different levels, you really lost. At a certain point all our developers refused to write new test cases for the system, because it always was the same nightmare of fighting unforeseeable language problems.
That was when we abandoned DUTS, and some time later Heiko came up with an initial implementation of tbot, soon to be joined by Harald to make a production quality test system out of it [4].
IMO, Tcl has a large number of situations where it's actual behaviours is not what you expect from it - it is good enough for simple things, but any more complex processing of arbitrary text data quickly drives you insane - things like quotes or braces and other special characters.
[1] http://www.denx.de/wiki/DUTS/DUTSDocs [2] https://wiki.tcl-lang.org/page/Commonly+encountered+problems+in+Tcl [3] https://wiki.tcl-lang.org/page/Why+can+I+not+place+unmatched+braces+in+Tcl+c... [4] https://tbot.tools/
Best regards,
Wolfgang Denk