Comment

Comment by nvivo

That's exactly the point. Enums are just enumerations, they're not classes. It makes little sense in my opinion to add constructors and variables to enums.

You can do exactly what java calls enums with classes in C#, which in my view are better suited to having constructors and fields. But I agree it's all preferences.

parent nvivo 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton