. Summarized nicely here, I think:
Gotcha, yeah. I think a good way to summarize the design problem is that in order to be a true bottom type Never must be a subtype of all types including existentials of protocols which place requirements on the metatype. The options appear to be:
Make an exception for Never in the subtyping rules for existentials.
Synthesize trapping implementations on Never for all static and initializer requirements of all protocols as well as a type alias equal to Never for all associated type requiremen…
jrose:
IMMEDIATE EDIT: I suppose whenever we add new requirements in a non-breaking way, we also add defaults for those requirements, and those defaults could apply to Never as well. But it applies to protocols that have those requirements already.
Sounds good! Seems to me like this pitch should really be something like, "Conform Never
to every protocol without the static/(non-throwing)initializer issue", then, but Codable
's a good addition.
2 Likes