Recommendation on option parsing

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 10 02:50:03 PDT 2014


On 2014-05-10 01:09, Chris Piker wrote:
> Phobos' std.getopt is a bit spare for my taste, as there is
> no builtin general help facility with word-wrapping.
>
> Does anyone have a recommendation on which of the existing
> command line option parsing libraries floating around in the
> wild to use?  If it doesn't compile against the current
> version of phobos I'm willing to put in a little work, but
> since I'm very new to D I probably would not make the best
> design decisions.

I'm using the one in Tango [1] with some additions [2]. It's a bit messy 
and I don't consider it stable, but it will automatically generate the 
help text. You can see some of it's uses here [3].

[1] https://github.com/SiegeLord/Tango-D2
[2] https://github.com/jacob-carlborg/mambo/tree/master/mambo/arguments
[3] 
https://github.com/jacob-carlborg/dstep/blob/master/dstep/driver/Application.d#L53

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list