std.getopt suggestion
Nick Sabalausky
a at a.a
Fri Sep 30 11:27:06 PDT 2011
"Jose Armando Garcia" <jsancio at gmail.com> wrote in message
news:mailman.317.1317404375.26225.digitalmars-d at puremagic.com...
>
> 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.
> 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.
More information about the Digitalmars-d
mailing list