TCL is fine. It's easy to embed, small, and has a low memory footprint. Interop with C (or anything that knows how to interop with C) is very easy. It's powerful enough for complex automation, and simple enough that you can almost use it like a DSL.
It might not be the fastest language, but TCL is much faster than the things you typically see it used to automate. Certainly more than fine on any computer built within the last 15 years, even with all the string parsing.
It's stable, well documented, and has a huge codebase available on the internet. There is also a stable user community.
TCL has a foothold in the EDA industry, yes. I think that's mostly because "if it ain't broke, don't fix it". Vivado and Quartus might each be hot garbage in their own unique ways, but that's not the fault of their scripting language.
I admit that TCL is a litle weird looking, and it doesn't feel like any other language. It's closer to LISP than to C, and closer to BASH than to LISP. But it's powerful, stable, and entrenched. And beautiful in its own way.
But it is broken. It has a ton of gotchas, WTFs and confusing behaviour. I appreciate maybe there weren't many easy to embed languages in the 80s, but there are loads now! Lua is an obviously better choice.
Tell me one reason to use TCL over Lua (that isn't "we've always used TCL and can't be bother to change it").
Lua's a great language, and I've got nothing bad to say about it.
TCL is fine too though. I think its main problem is that it feels alien to people who haven't used it much. That plus the way that comments are treated by its tokenizer. :)
For new programs, the only reason to embed TCL would be if your audience already knows it. If I was writing a new piece of EDA software today, I'd probably still choose TCL because it would have critical mass with my userbase.
For existing programs, what's the benefit in switching? If you get beyond the "TCL is ugly" mindset, what benefit would Xilinx/Altera/Synopsys really gain by switching? Their whole userbase already knows TCL, and there are tons of scripts that are already written. Switching to Lua wouldn't add any new functionality, and it would be hugely expensive. It would also annoy their userbase, who would have to go off and rewrite all of their own scripts without any benefit.
I guess you could characterize that as "we've always used TCL and can't be bothered to change it", and you're not wrong. But I'd challenge the assertion that it needs changing. TCL has a big standard library, and an enormous amount of third-party code in the wild. It was even an important Unix system language for a while there. Today, TCL still lives on in Expect and Tk (generally wrapped by tkinter). It's probably lurking in lots of other places as well.
Would you tell the Welsh that they should give up their language just because English is more widely used? Sometimes a language takes hold somewhere, and it becomes part of the culture. Switching isn't impossible, but is the benefit worth the hassle?
It might not be the fastest language, but TCL is much faster than the things you typically see it used to automate. Certainly more than fine on any computer built within the last 15 years, even with all the string parsing.
It's stable, well documented, and has a huge codebase available on the internet. There is also a stable user community.
TCL has a foothold in the EDA industry, yes. I think that's mostly because "if it ain't broke, don't fix it". Vivado and Quartus might each be hot garbage in their own unique ways, but that's not the fault of their scripting language.
I admit that TCL is a litle weird looking, and it doesn't feel like any other language. It's closer to LISP than to C, and closer to BASH than to LISP. But it's powerful, stable, and entrenched. And beautiful in its own way.