enum

Meta jared771 at gmail.com
Wed Apr 9 11:44:26 PDT 2014


On Wednesday, 9 April 2014 at 18:18:57 UTC, Meta wrote:
> On Wednesday, 9 April 2014 at 18:05:15 UTC, Andrei Alexandrescu 
> wrote:
>> That was for C++, and a function vs. a cast didn't improve the 
>> experience much. -- Andrei
>
> The difference being that a function is safe whereas a cast is 
> not.

When going the other way, that is. When going from enum -> value, 
E.val is more sightly than cast(int)E.


More information about the Digitalmars-d mailing list