Hacker News new | ask | show | jobs
by brutt 2221 days ago
It's good thing, but it leads to error in code which must talk to C or network, where enum's are not cast in stone.
2 comments

You really should not be casting data structures sent over the network directly to local data structures, unless you are using capnproto or another zero copy protocol that does that safely.
You can assign any value to a C enum, they literally are just integers.