Why is Scala not an enumeration type and what are the advantages of the current design?

What is the reason why they decided not to implement enum in Scala? What are the advantages of the current language design (object definition and scala.Enumberation extension instead of creating a new enumeration )?

+4
source share
1 answer

I do not see any reasonable advantages of listing in the current state and tend to think that this is a design error that the scala community is trying to overcome . It's not easy, but I think it will definitely be done in the next two major versions of scala. In all scala code, I saw a preference for an isolated hierarchy of objects.

+6
source

Source: https://habr.com/ru/post/1500561/


All Articles