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.
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.
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.
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.
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.
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.
rossberg
left a comment
There was a problem hiding this comment.
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.
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.