2 ms·
I suspect it is a remnant of the DOS days.
by digi_owl 9y ago
I suspect it is a remnant of the DOS days.
- userbinator 9y agoThe "command line as a single string" dates to CP/M if not earlier: https://en.wikipedia.org/wiki/Zero_page_(CP/M) https://en.wikipedia.org/wiki/Zero_page_(CP/M) I don't think it's an optimisation, but a design choice of simplicity; in fact, CP/M (and DOS) would parse the first two arguments if present, and put the results into the filename fields of the two default FCBs, allowing programs which take two filename arguments (traditionally, an input and an output) to be implemented easily without having any commandline parsing logic of their own. More info on that here: http://www.gaby.de/cpm/manuals/archive/cpm22htm/ch5.htm http://www.gaby.de/cpm/manuals/archive/cpm22htm/ch5.htm It would be interesting to trace the origins of command-line parameter passing design even further, to the mainframe OSes that came before UNIX, but I'm not so familiar with them. Edit: OpenVMS appears to also pass a plain string to the process, which is then parsed within: http://hoffmanlabs.org/vmsfaq/vmsfaq_015.html http://hoffmanlabs.org/vmsfaq/vmsfaq_015.html (section 10.3)