Command line parsing

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun May 15 23:36:03 PDT 2016


On 2016-05-16 01:36, Vladimir Panteleev wrote:

> I'm not sure if you saw it, but funopt uses the same basic idea.
>
> When writing ae.utils.funopt, I debated for a bit whether I should use a
> struct or a function signature as the base for specifying the arguments
> and their documentation. In the end I went with a function, because it
> covered all the most important cases, was simpler to use, and closer
> follows the analogy of invoking a process with some arguments vs.
> calling a function with some arguments.

To me it looks like it can get a bit too verbose for a single function 
when having more than a couple of flags.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list