On Monday, 28 May 2012 at 13:47:47 UTC, Andrei Alexandrescu wrote:
On 5/28/12 8:19 AM, foobar wrote:
See functional languages such as ML for a correct
implementation and also Java 5 Enums (similar but with an OO
flavor).
I've always found it amusing to watch what a kitchen sink Java
enumerations have become. It's as if someone said, "so you
complain Java doesn't have enum? I'll give you enum!" I think
we shouldn't copy that design.
I could never wrap my head around how the Java Enum/Class was
suppose to work or why.
Also couldn't figure why they wouldn't have a simple structure i
could pass around that held data by itself without creating a
class from it.