2 ms·
> Everything is a string is a great way to reduce the mental load about typing. I feel almost the exact opposite way... Everything is a string means I have to
by ghettoimp 7y ago
> Everything is a string is a great way to reduce the mental load about typing.
I feel almost the exact opposite way...
Everything is a string means I have to "know" whether any given function takes {a single element, a list of elements, a glob, a list of globs, ???}.
When I inevitably mess it up, I don't get any help at all from the language. In the best case, I'll hit a run-time error and figure it out. In the worst case, my program will just do some random thing that isn't what I wanted, and I'll get to debug it.
- roastsquirrel 7y agoThe Tcl/Tk documentation is very good, so I read the documentation for those details, eg for lrange, lrange list first last List must be a valid Tcl list. This command will return a new list consisting of elements first through last, inclusive ... (not put it all here because it goes on a bit :)
- ghettoimp 7y agoSure. Sadly my company's code base, and the vendor's tool that it extends, are not so well documented. A statically typed language gives just you so much more sanity checking -- sometimes even without having to compile anything, what with these fancy IDEs.