3 ms·
Mh. Is this a fair comparison? The unix part is massively simplified, and the windows parts goes into great and great details about the implementation of that e
by tetha 9y ago
Mh. Is this a fair comparison? The unix part is massively simplified, and the windows parts goes into great and great details about the implementation of that entry point.
Bash command line splitting alone is nasty, let alone the 6 other shells. Every language under the sun has a dozen and twelve libraries to parse argv[] into something useful.
If you document every nook, cranny and special case of those libraries, the list for unix will dwarf the special cases of windows. In fact, I think bash command line parsing alone can dwarf the windows section, according to the man page.
- laumars 9y agoThe reason the Windows section is longer is because in Windows it's the application that splits the argv[]. An application receives the parameters as one long string and the application itself splits it into argv[] which means that there isn't a whole lot of consistency in how argv[] gets populated. Where as on Linux / UNIX, parameters arrive at the application already split. Your point about the shells is a good one because at least on Linux you only need to learn the nuances of your preferred shell (though in my experience all the main ones seem to follow the same rules reliably) knowing that you wont have any weird issues for example with quotes being included or not included in argv[] in some applications but not others despite formatting the parameters in exactly the same way. From a personal point of view, I do find working with parameters in Windows a highly frustrating affair when compared with Linux. However I appreciate the issue is down to inheritance rather than design and Microsoft cannot easily change something like this without breaking a thousand things in subtle and often unexpected ways.