[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.
-
never
type is currently implemented by returning a generic value which is impossible to initialize, which is a really nice workaround:I wonder if the formal
never
type 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
never
andNever
as keywords.Beta Was this translation helpful? Give feedback.
All reactions