On 12.06.2011 10:31, KennyTM~ wrote:
On Jun 12, 11 11:18, Andrei Alexandrescu wrote:
On 06/11/2011 04:20 PM, Jonathan M Davis wrote:
2. He proposed a template wrapper which would allow you to type
yes!"enumName"
and no!"enumName" instead of the full Flag!"enumName".yes and
Flag!"enumName".no. Some people feel that this resolves complaint #2.
Others
think that it's still quite ugly.

Those were since replaced with No.enumName and Yes.enumName by Dmitry's
idea:

https://github.com/andralex/phobos/commit/801ccc96ce56827cd0d0b608895269bdccba4330



Andrei

Yes.X and No.X looks grammatically wrong. In D you usually have 'Aggregate.member', not 'Member.aggregate'.
Well, you can do only as much staying within the language.
Personally, I think the biggest stumbling block is error messages, maybe we can do something about them. Like make Flag struct with alias this and provide this(Flag!s) constructor, opAssign etc. that static assert something sensible on mismatch.

--
Dmitry Olshansky

Reply via email to