The other other way would be more structured. Arguments are not just an array, they also contain `--switch` and key/value pairs (e.g. `--key value` or `--key=value` depending on who you ask). One problem with the flat array approach is there's no way to distinguish a literal value starting with `-` from a switch, which means there needs to be some way to workaround that (and users have to remember the workaround; how often do people remember to use `rm -- "$FILENAME"`).
In practice almost every application does still need to do its own parameter parsing; a flat array is not enough.
Re:Don't Put Tilde In Your Path
by NetMageSCW on Monday October 12, 2026 @02:39PM
(#50060847)
VMS had a command description language that was used to define new commands and including allowed arguments and types.
Re:Don't Put Tilde In Your Path
by NetMageSCW on Monday October 12, 2026 @02:38PM
(#50060833)
Sure it is. How do you echo a command without executing it if the command is passed in?
Want to quote a command line that may already contain double quotes, in order to pass it as an argument to some other program? No, you don't. It isn't right to want that.