8 ms·
We use TCL for a couple of core scripts at work because most of the tools we spend millions of dollars on in licensing use TCL as their embedded interpreter (I
by engtech 14y ago
We use TCL for a couple of core scripts at work because most of the tools we spend millions of dollars on in licensing use TCL as their embedded interpreter (I work in EDA/semiconductors).
I find the most unproductive use of my time at work is when writing TCL code. Switching to TDD has helped a lot, but I still find the language maddeningly frustrating.
I hate that this is both valid syntax with wildly different meanings:
set env(VAR) "value"
set $env(VAR) "value"
I hate that TCL error messages have no prefix, so there is no way to grep for them (the 3rd party tools merge STDOUT and STDERR to a single log).
I hate that the TCL error message line numbers are RELATIVE TO THE PROCEDURE instead of relative to the file.
I hate that the language is fully interpreted and not compiled, so you can have a syntax error in a code branch that isn't triggered just lying there for months if you don't fully unit test every code path.
I do not understand how anyone could like TCL unless they were using a linting tool to give the robustness of debugging that most other languages have.
Because of our code base and the 3rd party tools I'm not able to lint our code and it is a brutally painful language to debug.
- bch 14y agore: TDD -- tcltest ([package require tcltest], man n tcltest) is downright brilliant. Brilliant. It's worth noting that Tcl is the core of the GCC testsuite (dejagnu) as well http://www.gnu.org/software/dejagnu/ http://www.gnu.org/software/dejagnu/
- arthurschreiber 14y agoI also created a very rspec like bdd library, called tclspec: https://github.com/arthurschreiber/tclspec https://github.com/arthurschreiber/tclspec
- deleted 14y ago[deleted]
- helmut_hed 14y agoJust out of curiosity (having used Tcl shell EDA tools myself) could you Swig stub versions of the proprietary commands and test your scripts standalone?
- luser001 14y agoIf you haven't already, you might want to look into Nagelfar. http://nagelfar.berlios.de/ http://nagelfar.berlios.de/