How to model type-safe enum types?
I must say that the example copied out of the Scala documentation by skaffman above is of limited utility in practice (you might as well use case objects). In order to get something most closely resembling a Java Enum (i.e. with sensible toString and valueOf methods — perhaps you are persisting the enum values to … Read more