Thread overview
Command Line Parsing
Apr 12, 2017
Russel Winder
Apr 12, 2017
rikki cattermole
Apr 12, 2017
Nicholas Wilson
Jan 27, 2018
ChrisPiker
Apr 12, 2017
Basile B.
Apr 15, 2017
Jon Degenhardt
April 12, 2017
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 ?


-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

April 12, 2017
On 12/04/2017 10:51 AM, Russel Winder via Digitalmars-d-learn 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 is a little clunky, but it is what I would prefer most of the time.
They are basically just different ways to do the same exact thing. So most of the time it is simply a preference thing.
April 12, 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 ?

there is also Vladimir Panteleev's  ae.funopt

https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/
https://github.com/CyberShadow/ae/blob/master/utils/funopt.d
April 12, 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);



April 15, 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 ?

I use std.getopt in my tools. Overall it's pretty good, and the reliability of a package in the standard library has value. That said, I've bumped up against it's limits, and looking at the code, it's not clear to how extend it to more advanced use cases. There may be a case for introducing a next generation package.

--Jon
January 27, 2018
On Wednesday, 12 April 2017 at 10:58:07 UTC, Nicholas Wilson wrote:
> 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 ?
>
> there is also Vladimir Panteleev's  ae.funopt
>
> https://blog.thecybershadow.net/2014/08/05/ae-utils-funopt/
> https://github.com/CyberShadow/ae/blob/master/utils/funopt.d

Thanks for mentioning this, looks to be just what the doctor ordered.

Coming in from python I've been disappointed by getopt and frustrated by Argon.  This looks like it might fit the bill.  Meta-names for option arguments ( ex: --index=FILE ) are an efficient way to communicate intent to users, nice to see them included.

Thanks,