[dmd-beta] Migration path for enum Endian?

Rory McGuire rmcguire at neonova.co.za
Wed Sep 7 01:38:04 PDT 2011


+1

On Wed, Sep 7, 2011 at 12:44 AM, Andrei Alexandrescu <andrei at erdani.com>wrote:

> Probably a good idea would be to enhance the language to allow "deprecated"
> in front of single enum values:
>
> enum Test
> {
>   a,
>   deprecated b,
>   c
> }
>
> At this point we should pay a great deal of attention to this language
> feature.
>
>
> Andrei
>
>
> On 9/6/11 5:39 PM, Jonathan M Davis wrote:
>
>> Also, I would point out that because you can't deprecate enum values, the
>> only
>> deprecation path is to have to have soft migration followed by removal.
>> So, I
>> don't know how much code breakage you're really saving by leaving the old
>> enum
>> values in temporarily. We can still do it, but the deprecated keyword and
>> whatever it brings to the table can't be involved in the process, because
>> you
>> can't put attributes on enum values.
>>
>> Fortunately, there weren't all that many enum values in Phobos which
>> didn't
>> follow the correct naming conventions outside of std.socket, and after
>> this
>> release, the only enum values with incorrect names should be the ones in
>> std.socket, which looks like it's probably going to be revamped anyway.
>>
>> - Jonathan M Davis
>> ______________________________**_________________
>> dmd-beta mailing list
>> dmd-beta at puremagic.com
>> http://lists.puremagic.com/**mailman/listinfo/dmd-beta<http://lists.puremagic.com/mailman/listinfo/dmd-beta>
>>
> ______________________________**_________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/**mailman/listinfo/dmd-beta<http://lists.puremagic.com/mailman/listinfo/dmd-beta>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20110907/1ede58d9/attachment-0001.html>


More information about the dmd-beta mailing list