Comment by IshKebab
9 days ago
> best thing about TCL is easy syntax and that everything is a string :)
What? That's the worst thing about TCL.
9 days ago
> best thing about TCL is easy syntax and that everything is a string :)
What? That's the worst thing about TCL.
I love it. Living proof that languages doesn't need forced types.
Data is Data. It's kinda object programming as visioned in the 70".
So easy and trivial language.
> Living proof that languages doesn't need forced types.
The opposite surely? TCL is practically dead, and only lingers on in the EDA industry (which has zero taste). Virtually every successful language today has at least a few different basic types for numbers, arrays, strings, maps and so on.
TCL's typicing discipline comes from shell languages and awk, which are decidedly not dead. The overwhelming majority of programmers have less than no taste, so language usage rates in general don't really mean much.
Well, if you use flightaware to track flights, you're using tcl. The vast majority of their codebase is in tcl.
If you place a sports bet online, odds (!) are that it will run through tcl in its business logic. I may even have written some of it.
Tcl has these types as well. They are special strings.
Number: string of digits. List: strings separated by space. Dictionary: key value pairs in a list.
2 replies →
It's only the interface that is of a string. An array is a list of strings with space between, but only for the programmer. The runtime is free to use an actual array.
I'm aware. It's awful because of the implications for the programmer, not the runtime.
It depends on the use case. For instance you open a socket, write there any value you have without serialization, read it in the other side, data transfer done.
The convenience of not having to marshal data over a network is certainly a use case. But I'll admit that two of the worst programs I ever saw were written in Perl and TCL. Somehow just a big jumble of inscrutable regexes.
When "everything is a string" then you have no choice but to literally treat everything as a string. Painful. Very cool project though.
That sounds more like someone who over-uses regexes - the developer is the problem, not the language
TCL has a lot of options for manipulating strings - take a look at just the built in string command for a start: https://www.tcl-lang.org/man/tcl8.4/TclCmd/string.htm
I have seen terrible code in Python, C, and more.
1 reply →
> When "everything is a string" then you have no choice but to literally treat everything as a string.
As someone who has been developing tcl almost daily for more than 30 years, both object oriented and imperative code, I have not found it necessary to think this way.
Can you explain what leads you to this conclusion?