Quantcast
Channel: Are enumerations recommended in scala (vs alternatives including trait/case object)? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Chris Martin for Are enumerations recommended in scala (vs...

I think it depends on what you're going to be doing. A sealed trait helps more at compile time, but Enumeration helps more at runtime.The big thing about sealed traits is that you get a compiler...

View Article



Are enumerations recommended in scala (vs alternatives including trait/case...

Is there a document that mentions explicitly whether a sealed trait with case objects is preferred vs Enumeration ? I personally have no real opinion/preference either way, but would like to be better...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images