3 ms·
Why? This is just for communication between the shell and its helper programs, the user wouldn't even see. What do you not like about escaping? Of course, fo
by eru 2y ago
Why? This is just for communication between the shell and its helper programs, the user wouldn't even see.
What do you not like about escaping?
Of course, for program-to-program communication you can also use different techniques, instead of escaping. Escaping is just the most human-readable and human-producible.
(As a simple example, to be able to represent all characters in a string, you can either escape quotes like \" or you can prefix the string with its length.
Computers can work with either convention, but humans will hate you if they have to prefix every string literal with its length and keep that length in sync with the string.)
- rini17 2y agoAre you aware that the main issue here is not with string literals, but with glob expansions? Literals are quite easy to check statically as mistakes usually cause havoc with surrounding code syntax. Even so, I avoid nontrivial use of them. But expansions and substitutions with escaping are the can of worms.