5 ms·
Mildly unrelated, but when I think of the opposite ("imaginative" enums), the first thing that comes to mind is this amusing vignette on the design process of J
by elehack 13y ago
Mildly unrelated, but when I think of the opposite ("imaginative" enums), the first thing that comes to mind is this amusing vignette on the design process of Java's enums: http://blog.des.no/2009/01/no-silly-its-enum/ http://blog.des.no/2009/01/no-silly-its-enum/
- brazzy 13y agoHow embarrassingly narrow-minded. Yeah, Java's enums are fully fledged classes. Which actually makes them extremely powerful and useful, more useful than enums in any other language. I've seen more than one C programmer unable to cope with such an extreme deviation from their bunch-of-integer-constants expectation.
- elehack 13y agoYeah, 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.