On Thursday, 14 October 2021 at 00:35:11 UTC, Bill Baxter wrote:
On Wed, Oct 13, 2021 at 5:30 PM Andrey Zherikov via
Digitalmars-d-announce < digitalmars-d-announce@puremagic.com>
wrote:
On Wednesday, 13 October 2021 at 19:26:49 UTC, Andrei
Alexandrescu wrote:
> Cool!
>
> One note - gflags
> (https://opensource.google/projects/gflags) allows modules
> to define their own flags in a decentralized manner. I've
> always thought this is a major feature missing from
> std.getopt, but never got around to it. It would be great if
> argparse would add such support.
This is an interesting approach. I'm not a fan of it but I'll
take a look at whether this can be supported.
Not sure how much change there is over "classic" gflags, but
https://abseil.io/docs/cpp/guides/flags is what google now uses
internally.
--bb
Abseil version suggests not to put flags into multiple .cpp files:
- `Allows distributed declaration and definition of flags, though
this usage has drawbacks and should generally be avoided`
- `Prefer to define flags only in the file containing the
binary’s main() function`
- `Prefer to reference flags only from within the file containing
the binary’s main() function`
So I'm a bit confused about supporting this use case