3 ms·
Why not just enclose your strings in quotes and be done with it? As far as I can see, this has nothing to do with typing and everything to do with syntax (of l
by runeks 6y ago
Why not just enclose your strings in quotes and be done with it?
As far as I can see, this has nothing to do with typing and everything to do with syntax (of literals). If strings were required to be quoted this problem wouldn’t appear.
This is the reason no programming language has this issue — regardless of type system (JS/Python/Java/Haskell). If you want a string here you need quotes.
Haskell could even be regarded as what the author calls “implicitly typed” — since types are derived from literals — and I’ve never heard a Haskeller complain about this issue.