2 ms·
The problem is that a single quote will often times appear in strings as well, and sometimes (like in the case of bash) can't even be escaped. So you end up req
by ed25519FUUU 6y ago
The problem is that a single quote will often times appear in strings as well, and sometimes (like in the case of bash) can't even be escaped. So you end up requiring double quotes either way.
Why not just settle permanently on double quotes? This is what Go and other languages did and I think it's a good idea.
- dragonwriter 6y ago> The problem is that a single quote will often times appear in strings as well, but they can't be escaped While having choice of quotes reduces the need for escaping, most languages that provide it also still support escaping. E.g., Ruby has double-quoted strings with escaping, single-quotes without, %Q(...) with, %q(...) without, and two different heredoc forms, with and without escaping (the forms that allow escaping also support interpolation).
- VWWHFSfQ 6y ago> This is what Go and other languages did and I think it's a good idea. Well Lua is about 30 years old and Go is, what, 10 years old? I would expect a language that is barely a decade old to improve on past ideas and mistakes.
- m4r35n357 6y ago\