Why is Phobos `Flag` so overthought ?
Nick Treleaven
nick at geany.org
Wed May 8 10:24:07 UTC 2024
On Wednesday, 8 May 2024 at 04:27:13 UTC, cc wrote:
> It doesn't allow a simple boolean to be used as an argument, or
> any other Flag as they are different instantiations of a
> template rather than equivalent aliases.
> It is however awful, cumbersome, annoying design and needs to
> be completely phased out now that we have named arguments.
Flag enforces that the argument says what it relates to. `true`
does not say what it relates to. Named arguments are optional, so
I don't see how they could make Flag redundant.
More information about the Digitalmars-d-learn
mailing list