On Jun 11, 11 01:42, Robert Clipsham wrote:
On 10/06/2011 17:15, Andrei Alexandrescu wrote:
https://github.com/D-Programming-Language/phobos/pull/94
Discuss!
Andrei
I really *really* don't like this. It's ugly and verbose, and a pathetic
work around for the lack of named parameters. Either support named
parameters or not, don't have an ugly half-baked work-around.
Well I agree it is ugly, but at least it's better than having the same
enum 7 times in Phobos (std.stdio.KeepTerminator,
std.string.CaseSensitive, std.algorithm.OpenRight,
std.algorithm.SortOutput, std.datetime.AllowDayOverflow,
std.datetime.PopFirst, std.datetime.AutoStart).
If named parameter is supported, those Flag!"foo" parameters can be
reverted back to bool without breaking the caller as the enum is based
on bool.