enum behaivor. another rehash of the topic

Tommi tommitissari at hotmail.com
Sun Dec 15 07:18:41 PST 2013


On Sunday, 15 December 2013 at 11:27:51 UTC, bearophile wrote:
> And some people have criticized the verbosity in special 
> situations, like this:
>
> enum Foo { good, bad }
> void bar(Foo f) {}
> void main() {
>     // bar(bad); // Not enough
>     bar(Foo.bad);
> }

A related discussion:
http://forum.dlang.org/thread/lssmuukdltmooehlnfpf@forum.dlang.org


More information about the Digitalmars-d mailing list