4 ms·
As you should expect, there's a reason: distinguishing variables of the script from names within the JSON document and from numerous keywords and builtin stuff.
by HelloNurse 5y ago
As you should expect, there's a reason: distinguishing variables of the script from names within the JSON document and from numerous keywords and builtin stuff. Variables get a sigil because in normal code they are a minority of the names.
- jolmg 5y agoYup. Same with shells. Sigils on variables are so we don't need to quote every argument/option on every command. And we don't want to quote our strings in the shell because different to other programming languages, shells are for interactive use and so string literals are far more frequent than variables.