Enum constants: UPPERCASE or CameCase?

I’m not sure it makes any sense to talk of types being either mutable or immutable… They’re a different kind of thing entirely. So it doesn’t make sense to apply the same rule to them.

Here is another argument why uppercase is a bad convention for constants.

In human languages uppercase is FOR SHOUTING, so why would use this for things that never change? Are constants really THE MOST IMPORTANT THING in your code? If anything, uppercase should be used for mutable variables.

See also https://accu.org/journals/overload/22/121/wakely_1923/


I use upper snake case when I can.
They become immediately obvious, the same way a const is immediately obvious, since enums should be constants.

Most of my enums end up in JSON where I want to have “USER_BUSY” and so on. The most direct way, without any translation and without having two sets of values, is to have enum constants use the same upper case name.