Flag proposal

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Jun 10 16:35:50 PDT 2011


On 6/11/11, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
> Ask, and ye shall receive.
>
> https://github.com/andralex/phobos/commit/801ccc96ce56827cd0d0b608895269bdccba4330

That's much more like it. This whole bikeshedding issue for me was
avoiding the nasty bang quote string unquote shenanigans that look
ugly in code.

Keeping No and Yes at the beginning kind of goes in hand with the not
operator. Now that I mention it, you can't negate a Flag variable:

Flag!"KeepTerminator" state;
auto line = getLine(!state);

But maybe that's a good thing?


More information about the Digitalmars-d mailing list