3 ms·
While there's no good reason for the Platonic ideal of a command-line to have one particular shape or another (a string! a list! a tree! a graph!) a vast number
by thristian 5y ago
While there's no good reason for the Platonic ideal of a command-line to have one particular shape or another (a string! a list! a tree! a graph!) a vast number of Windows and Unix apps are written in C or C++, which demand the standard main() entry point be given an array of strings. Even completely Windows-native apps that use WinMain() instead of main() still often need to take a filename on the command-line, or want to handle command-line switches, for which they need to lex the command-line string into an array of tokens.
- rossy 5y agoEven C#, a formerly Windows-only language, has Main(string[] args)