kotlin-guides
kotlin-guides copied to clipboard
Enum constant names
trafficstars
The style guide doesn't talk about naming enum constants. They don't fall under "Constant values can only be defined inside of an object or as a top-level declaration", so they are not covered by that rule, and there should be a separate one for them.
(And please don't require UPPER_CASE for all enum constants; that would be ugly. Our style guide allows both UPPER_CASE and CamelCase.)
@yole Please consider updating Kotlin's enum reference page to reflect that. Currently it looks like UPPER_CASE is the way to go.
(which I liked, because it's good for Java interop)