New library: argparse, for parsing CLI arguments

Andrey Zherikov andrey.zherikov at gmail.com
Wed Oct 13 12:11:03 UTC 2021


On Wednesday, 13 October 2021 at 11:59:06 UTC, WebFreak001 wrote:
> On Wednesday, 13 October 2021 at 11:27:40 UTC, Andrey Zherikov 
> wrote:
>> [...]
>> It also doesn't depend on anything besides the standard 
>> library.
>> [...]
>
> if you want to drop the dependency on std.typecons : Nullable 
> you could use https://code.dlang.org/packages/expected, where 
> you can additionally return error values with instead of 
> returning null on error.
>
> Doesn't cast to bool but can check for .hasError which is more 
> explicit.

This will break "doesn't depend on anything besides std" 
unfortunately.


More information about the Digitalmars-d-announce mailing list