Flag proposal

David Nadlinger see at klickverbot.at
Sat Jun 11 14:32:56 PDT 2011


On 6/11/11 11:20 PM, Jonathan M Davis wrote:
> 1. Programmers following this idiom (including the Phobos devs) end up
> creating enums with yes and no values and are effectively identical to other
> enums except for their names. So, we end up with a fair bit of boilerplate
> code just to pass a strict boolean value.

s/fair/tiny/, imho:

---
/// ditto.
enum SomeFlag { enable, disable }
---

David


More information about the Digitalmars-d mailing list