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

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?




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

Search: