Question

What is the reason why they decided not to implement enum type in Scala ? What are benefits of current language design (defining object and extending scala.Enumeration instead of creating new enum type ) ?

Was it helpful?

Solution

I don't see any reasonable benefits of Enumeration in it's current state and tend to think it is design flaw that scala community is trying to overcome. It is not easy, but I guess this is definitely will be done in next two major scala versions. In all scala code I've seen sealed object hierarchy was given a preference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top