Command Line Parsing

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 12 04:04:56 PDT 2017


On Wednesday, 12 April 2017 at 09:51:34 UTC, Russel Winder wrote:
> Are Argon https://github.com/markuslaker/Argon or darg  
> https://github. com/jasonwhite/darg getting traction as the 
> default command line handling system for D or are they just 
> peripheral and everyone just uses std.getopt 
> https://dlang.org/phobos/std_getopt.html ?

std.getopt always, also since a few weeks i think that a better 
version could be done. The expected options are defined in a 
run-time parameters. This can definitively be some template 
parameters, which would allow complex static checks and more 
optimal code.

Now:

     GetOptResult r = getopt(args, "o|option", &o, "p|param", 
&param);

The future:

     GetOptResult r = getopt!("o|option", o, "p|param", 
param))(args);





More information about the Digitalmars-d-learn mailing list