Design of reflective enums

renoX renosky at free.fr
Fri Feb 23 12:28:46 PST 2007


Serg Kovrov a écrit :
> Andrei Alexandrescu (See Website For Email) wrote:
>> On the contrary, I think it would be great if it were _not_ in the 
>> core language, and I'd be happy if a library enum was so good, it 
>> would cause deprecation of the built-in one.
> 
> It's a great idea! But there are few issues that should be addressed:
> 
> 1. Library implementation of enums should be able to produce a typedef, 
> just like built-in enums.

This is doable, unfortunately function overload on typedef/enum seems 
broken, so..

> 2. Built-in enums do not produce symbols in object files. Neither should 
> library implementation.

Well for reflective enums, you need to store the strings somewhere..

renoX



More information about the Digitalmars-d mailing list