Follow

has enums, but you can cast regular ints to them, increment them, etc., giving you invalid values.

That seems to defeat the main job of enums.

C#: "We'll give you safety, but we'll also absolutely give you a duct full of buzz saws and live electrical cables if you really want to crawl through it."

@peterdrake Actually it can be different types, not just ints. Anyway, it's a tradeoff, personally I'm fine with those.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.