title: When to use enumerations?
body: <p>I have this example (in Java) where there are models, each with the same set of types.  I defined the types as enumerations.  When I went to present this program to the advisor (it's a project), he stated it wasn't wise to use enumerations as it makes the program inflexible for changes because enumerations are not extendable. So if I want to add another type at some point, I cannot do this without recompiling.  Is there ever a situation where you'd prefer enumeration over creating objects instead?  It seems to me that if you can choose between a flexible class with objects and a non flexible class with enums, you might as well use objects every time, even when you're '99%' sure the types will never change.</p>