5 ms·
Yeah, Java's enums are very powerful and useful. But in the context of a C-style language, I can understand the "what? these are enums. why do they have method
by elehack 13y ago
Yeah, Java's enums are very powerful and useful.
But in the context of a C-style language, I can understand the "what? these are enums. why do they have methods? and subclassing?"
It might be good if they had a different name.
- brazzy 13y agoThe essential property (a type having a fixed number of named instances) is still there, so the name is fine. I can fully understand that someone used to C enums would go WTF at seeing Java enums for the first time. What makes it narrow-minded is when this leads you to rejecting them outright and writing blog posts to ridicule them.