obsolete D libraries/modules

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Sep 1 07:28:45 PDT 2013


On 9/1/13 2:07 AM, Jacob Carlborg wrote:
> On 2013-09-01 04:29, Jonathan M Davis wrote:
>
>> std.getopt is definitely lacking some nice-to-have features (like
>> automatically
>> generating --help from the options), but for the most part, I don't
>> think that
>> it can be improved much without seriously complicating it. I think
>> that it's
>> about at the limit of what can be done and still have it be simple,
>> and it
>> works really well for the most part, so if we haven't hit the sweet spot,
>> we're at least close. I've toyed with trying to figure out how to
>> improve it,
>> but I think that doing so cleanly would be very hard.
>
> I don't know if you're referring to the API or the implementation. But
> if you're referring to the API I think something like this could be made
> to work:
>
> string outputFile;
> getopt(args, "output", &outputFile).min(2).max(4).restrict("a", "b",
> "c", "d");

What would this line do?

Andrei



More information about the Digitalmars-d mailing list