Why is Phobos `Flag` so overthought ?

Nick Treleaven nick at geany.org
Thu May 9 18:52:39 UTC 2024


On Wednesday, 8 May 2024 at 10:24:07 UTC, Nick Treleaven wrote:
> Named arguments are optional, so I don't see how they could 
> make Flag redundant.

Actually, an external tool could detect when a bool is passed as 
an argument to a function and warn when not done with a named 
argument. This would free library APIs from having to use Flag 
when some users don't care about it. The cost would come in a bit 
more build system complexity/build time, which might mean a lot 
less enforcement due to inertia. Though maybe a reasonable 
trade-off.


More information about the Digitalmars-d-learn mailing list