4 ms·
It has some niche use-cases but I think in general it was just too awkward. "Everything is a string" kinda puts people off. Lua has similar weirdness with var
by VWWHFSfQ 3y ago
It has some niche use-cases but I think in general it was just too awkward. "Everything is a string" kinda puts people off. Lua has similar weirdness with various aspects but it's still highly successful in other niche areas.
I happen to really like Lua. But a lot of people don't like the 1-based indexing and table container can be difficult for people get wrap their head around.
- bch 3y ago> "Everything is a string" kinda puts people off. I can't speak for "people", but i think this might be a bit of misunderstanding combined w an implementation detail. I think most Tcl people these days would say "everything is representable as a string", which is to say types can be marshalled back/forth through a string representation. This (with other features) allows Tcl to be homoiconic[0] (it can evaluated the symbols it emits itself). Pre-8[1] (1997/1998(?)) Tcl internals did also indeed use char* strings to do its own work parsing/evaluating, but Tcl8 brought in so called Tcl_Obj structures w "dual ported" values that keep the iconic string representation available, as well as a native value (ie: integer when using the value as an integer, so you wouldnt need to do something like atoi() on a string rep when you wanted to do math). [0] https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity [1] https://tcl.tk/software/tcltk/8.0.html https://tcl.tk/software/tcltk/8.0.html
- IshKebab 3y agoSemantically everything is a string, even if they have performance optimisations to make that slightly less insane. Performance is only one of the issues with "everything is a string". Bug-proneness is probably a bigger issue and you can't fix that with optimisations.
- jollyllama 3y agoYes, it makes debugging a large or distributed TCL application hellish. Once you have had to deal with that, you will be put off of TCL for life.
- canadianfella 3y ago[dead]