Hacker News new | ask | show | jobs
by janci 480 days ago
How that works when you need to distinguish between "no value provided" and "a value that is not in the list" - in some applications they have different semantics.
1 comments

You could treat it as an nullable Option<SomeType>.

In practice, as it relates to enums, I don't usually see 'no value provided' as a frequently used case - it's more likely that 'no value provided' maps to a more informative 'enum' value