-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elaborate on habitability of exact references #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very clear, thank you.
Why not make the others uninhabited as well? With exn in particular there could in fact be motivation to introduce subtypes in the future (e.g., ones that disclose the tag's type or something like that). With i31 you could theoretically have subtypes that record something about the value range (e.g., fits a byte etc), although that seems unlikely. But I'd suggest not to take any chances, especially since I see no particular benefit in using these — they don't add any precision today. |
Why not go yet another step further and disallow That would entirely rule out anyone relying on any specific behavior of exact abstract references, so it would have maximum forwards compatibility to any spec changes we might desire to make in the future. For implementations consuming Wasm, enforcing this rule would be a pretty simple check in the decoder (even easier than enforcing that (Taking a step back, I think as a general principle we should err on the side of disallowing things that have no use case, rather than allowing them "for consistency". Having to support nonsensical/unused things, in general, adds significant complexity. We can always relax such restrictions later (or lift them entirely) if use cases arise.) |
@jakobkummerow, see the discussion on #9. |
@rossberg yes, what about it? Consensus in that discussion was that exact abstract types are both harmless and useless. I'm asking why we don't just drop them on account of their uselessness. That would certainly address the concerns in your previous post about |
That also was the question we discussed there. |
I support having a more in-depth discussion about whether we should allow exact references to abstract types at all. Thanks for opening #15, @jakobkummerow. While that conversation is pending, I will update the overview to say that |
I opened #16 to make this change. |
No description provided.