-
Notifications
You must be signed in to change notification settings - Fork 10
Change signature of Global constructor #16
Comments
maybe |
Hm, seems a bit redundant, as it is part of a type description already. The API doesn't say elementType or parameterTypes either. I'd pick a name that captures what thing the field classifies, not what its own (meta)type is. |
OK, so by that argument it should be
|
I agree 'value' is confusing. The name should have 'type' in it. 'contentType'? (Personally I think 'type' is unambiguous and that the motivation is on the weak side, but any clear alternative is probably OK.) |
Note that it is part of a type already. With the JS type reflection proposal, I see the possible confusion with |
Trying out
I still think
|
The expression |
We discussed this in the May 15th CG meeting and decided to use |
Does the decision mentioned above close this issue? |
Yes, closing. |
To form a forward-compatible basis for the JS API type reflection proposal, I'm proposing two minor changes to the signature of the JS-side
Global
constructor:type
field to something else, e.g.,value
orcontent
(similar to theelement
in table descriptors).Tothether these make the descriptor into a suitable representation of a Wasm global type, which would be compatible with other occurrences of this type in the proposed reflection API.
(The motivation for renaming the
type
field is that the whole descriptor represents the "type" of the global, so the field should be given a more specific name.)The text was updated successfully, but these errors were encountered: