Amazon.com Widgets

New API Design Guideline: Enums

There are a few topics that are likely to generate a long thread of discussion whenever they come up Exceptions, finalization, and Enums are among them    Kit George spent a fair amount of time working with folks across WinFX on how to “correctly” use Enums.  There is of course, more to say here, but I think this is a good first start.  As always, love to have your feedback.

http://blogs.msdn.com/kcwalina/archive/2004/05/18/134208.aspx

 

Published 18 May 04 10:32 by BradA

Comments

# Ken Brubaker said on May 18, 2004 2:00 PM:
Brad Abrams clued us in to the revised Enum usage guidelines.
# Daniel Pratt said on May 18, 2004 12:51 PM:
What would be the downside to changing the way values are automatically assigned to enum "members" (without an explicit value assignment) if the "Flags" attribute is present?
# Nicholas Allen said on May 18, 2004 2:25 PM:
One thing I don't like about these guidelines is that modifying an enum is considered acceptable. Most strong enum implementations (which admittedly .net is not trying to provide) define this as a compatibility breaking change. The guideline even goes on to say

Developing with the suspected future versioning of an enum in mind is the required attitude.

Which is pretty much acknowledging that changing a widely known enum type will break a lot of code.
# UnknownReference said on May 19, 2004 11:34 AM:
Link Interface 30.
New Comments to this post are disabled

Search

Go

This Blog

Syndication

Page view tracker