-
Notifications
You must be signed in to change notification settings - Fork 73
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
Spec abstract syntax for GC types and instructions #373
Conversation
Is there a good way to view the rendered versions of spec PRs like this? |
|
||
The abstract types |STRUCT| and |ARRAY| denote the infinite union of all :ref:`structure <syntax-structtype>` and :ref:`array <syntax-arraytype>` aggregates, respectively. | ||
|
||
The abstract type |I31| denotes *unboxed scalars*, that is, integers injected into references. |
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.
Is i31 really abstract? It seems that it should be considered concrete since there are values for which it is the dynamic type. Maybe instead of "concrete" we should be using "defined" or similar?
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.
Yeah, fair question. As far as the type system is concerned, it is in the same category as the other abstract types. This is just a syntactic distinction, not a semantic one.
Another alternative would be "specific" vs "nonspecific"/"generic", but that has the same awkwardness wrt i31.
Maybe there is a better pair of adjectives, but so far I can't think of any. I don't think "defined" works, because the opposite would then be "undefined". Plus, I already need "defined type" for something else.
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.
Maybe "declared" and "undeclared"? "undeclared" seems accurate to describe all the built-in types that are not declared/defined in the type section, but idk if we have precedent talking about declarations at all.
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.
Right, I think we don't currently talk about "declarations" anywhere. But more importantly, "undeclared" still has this strong connotation of being erroneous, doesn't it?
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.
Hmm maybe, although not nearly as much as "undefined" IMO. Maybe "declared" and "built in" would work?
Anyway, I don't think figuring out the perfect names here should block landing this.
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.
Is there a good way to view the rendered versions of spec PRs like this?
Unfortunately, no, AFAICT, other than building it locally. Would be great to have infrastructure for that, but I don't know how that could be built and where the rendered pages could be uploaded canonically.
|
||
The abstract types |STRUCT| and |ARRAY| denote the infinite union of all :ref:`structure <syntax-structtype>` and :ref:`array <syntax-arraytype>` aggregates, respectively. | ||
|
||
The abstract type |I31| denotes *unboxed scalars*, that is, integers injected into references. |
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.
Yeah, fair question. As far as the type system is concerned, it is in the same category as the other abstract types. This is just a syntactic distinction, not a semantic one.
Another alternative would be "specific" vs "nonspecific"/"generic", but that has the same awkwardness wrt i31.
Maybe there is a better pair of adjectives, but so far I can't think of any. I don't think "defined" works, because the opposite would then be "undefined". Plus, I already need "defined type" for something else.
Does not yet include type definitions.