3 ms·
Because you are forced to. That's the only reason. Otherwise please use something modern and sane like Deno, Python, Go or even Rust. TCL has many large flaws
by IshKebab 3y ago
Because you are forced to. That's the only reason.
Otherwise please use something modern and sane like Deno, Python, Go or even Rust.
TCL has many large flaws that those languages don't share:
* No static typing so trivial errors are not caught early and code is difficult to understand and navigate.
* Everything is a string (TCL people try to claim otherwise but semantically it really is true). This leads to typing mistakes too.
* Quoting is a mess. It's simple in that the implementation is simple, but languages shouldn't optimise for that alone. Actually getting quoting right in TCL is ... well it's not as bad as Bash or even YAML but it's still something you have to think about, which isn't true for any of the other languages I listed.
If you need a language to embed in your program then while I'm no Lua fan, it is at least significantly better than TCL.
- dkfellows 3y agoAlmost all quoting for non-trivial cases comes down to the [list] command. It does the Right Thing, especially in the critical cases where you're generating a command to call later. Pretty much everything else is either much simpler to the point of needing no thought at all, or complex enough that you're best off writing a command to do it properly (e.g., because you're generating JSON or CSV or some other language like that) as you'll want to test it thoroughly too. It's hard to be much more specific than that without talking detailed examples.
- MrStonedOne 3y ago[dead]