[lang design] [discuss] is introducing never type a good idea?
#421
shamiao
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
nevertype is currently implemented by returning a generic value which is impossible to initialize, which is a really nice workaround:I wonder if the formal
nevertype is worth introduced to the language? May be used on 2 minor parts:A) dead code removal
B) ignore non-exist arms of enums:
If the never type is decided to not introduce, it's still recommended to reserve
neverandNeveras keywords.Beta Was this translation helpful? Give feedback.
All reactions