4 ms·
Tcl is the shell done right. Simple, logical, consistent.
by andrewshadura 1y ago
Tcl is the shell done right. Simple, logical, consistent.
- BoingBoomTschak 1y agoWell, it's certainly much better, especially now that we have dicts to replace arrays. But the specter of https://wiki.tcl-lang.org/page/exec+ampersand+problem https://wiki.tcl-lang.org/page/exec+ampersand+problem (cf https://core.tcl-lang.org/tips/doc/trunk/tip/424.md https://core.tcl-lang.org/tips/doc/trunk/tip/424.md) still looms.
- grewsome 1y agoTcl does appear to be a command language done right, I don't think there is a better one. As it was designed after bash etc, I guess the Tcl developers could see the inconsistencies there, which helped them do Tcl right.
- IshKebab 1y agoWell... Yes and no. It's definitely better than most shells, but that's a very low bar. It's pretty awful compared to any "real" programming language, which is a problem because it's used in places where a real programming language would be much more appropriate.
- grewsome 1y agoTcl is a real programming language, but it depends on what you are doing with it. There are a lot of people who have never come into contact with command languages, and so there are plenty that look at it and have a negative response. For a lot of people though, Tcl is as easy to program in as Python or any other scripting language. It's a heck of a lot _easier_ to program in than a lot of so called real programming languages. I've found Ousterhout's dichotomy to be true, using two languages for a codebase is very efficient, but again, it'll depend on what you're doing.
- IshKebab 1y agoIt depends what you mean by easy. There are fewer features sure, but it's kind of like saying building a house with just a hand saw and a hammer is easy. Sure there are fewer tools to learn if you don't use CAD, power tools, laser levels, etc. But it's a bit dubious to say it's easier.
- grewsome 1y agoTcl doesn't have fewer features, it packs in a lot, probably because of its maturity, to a similar level as other mature scripting languages (OO, coroutines, event loop, slave interps, etc, etc). But it's poor when you want something to run quick, or if you want to carefully manage memory because you have a lot of data. Also there is no typing, and for large code bases that is detrimental. But by using two languages you can get the best of both worlds. But then you need to program competently in two languages, and that takes a surprising amount of experience, and the hand saw and hammer analogy isn't accurate in this case.