"Nick Sabalausky" <[email protected]> wrote in message news:[email protected]... > "Jose Armando Garcia" <[email protected]> wrote in message > news:[email protected]... >> >> I prefer if we take std.getopt one step further (or create another) >> and make it completely global. Don't allow the parsing of anything but >> the command line > > Are you serious? Don't allow it? Why? What benefit could that possibly > provide? It makes perfect sence to think that there may be legitimate > reason to use a commandline parser on something other than the current > process's cmd args. Unittesting, for one, just off the top of my head. > Other people here have mentioned other uses. > > It doesn't make any sence at all to arbitrarily prevent a tool from being > applied to whatever the user chooses to apply it to. >
It's like applying fascism to API design. >> and make the results of the parsing available as >> immutable to all the threads in the process. > > So you want to prevent people from being able to enforce encapsulation of > that? If they want to make it available, they can trivially do that > theirself. But you can't go the other way around. > >
