What's the naming convention for a Scala enumeration type? For example, in the below code:
object EventType extends Enumeration {
type EventType = Value
val Registered = Value("Registered")
val Started = Value("Started")
}
/**
* The event that fires under specific life cycle
*
* @param eventType the [[EventType.EventType]]
*/
case class Event(eventType: EventType.EventType)
The above code follows the same style as described in the Scala doc. The question here is you can see the name of "EventType.EventType" is quite redundant and also quite strange when compared with enum definitions in other languages like Java or C#.
So I'm wondering if there is any recommended naming style to improve the readability?
Thanks in advance.