Enums want to be classes...

Matt Berther bio photo By Matt Berther Comment

Michael Feathers has a post that talks about the exact reasons why I hate enums.

By designing your enums as classes, you gain a lot more flexibility down the road. In addition, the polymorphic capabilities gained from this technique covers you from some of the inherent dangers of using enums (such as adding or removing an enum, and not having a default handler in your switch statement).

This technique also reminds me of the Replace Type Code with State/Strategy and the Replace Conditional with Polymorphism refactorings from Fowler's book.