kotlin-guides icon indicating copy to clipboard operation
kotlin-guides copied to clipboard

Enum constant names

Open yole opened this issue 8 years ago • 1 comments
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 avatar Nov 17 '17 10:11 yole

@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)

hho avatar Dec 18 '17 10:12 hho