You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the extension struct proposal (#2360), I propose extension structs as a way to support wrapper-less views on an underlying representation (see the meta-issue for linked context). In the proposal, I only allow a single field to be declared on the extension struct. This is so that the extension struct may be represented at runtime simply as the value of that field. There are two ways that we could consider allowing multiple fields:
We could say that extension structs with multiple fields get wrapped into a container object (essentially auto-boxing).
We could say that an extension struct with multiple fields is simply an unboxed aggregate, which is not a subtype of Object, but which represents the equivalent of a raw C struct, with move semantics.
The former is unappealing to me, since the entire goal of this feature is to avoid implicit wrapping.
The second has some appeal, but feels somewhat under-motivated.
This issue is for discussion and feedback on this.
The text was updated successfully, but these errors were encountered:
In the extension struct proposal (#2360), I propose extension structs as a way to support wrapper-less views on an underlying representation (see the meta-issue for linked context). In the proposal, I only allow a single field to be declared on the extension struct. This is so that the extension struct may be represented at runtime simply as the value of that field. There are two ways that we could consider allowing multiple fields:
Object
, but which represents the equivalent of a rawC
struct, with move semantics.The former is unappealing to me, since the entire goal of this feature is to avoid implicit wrapping.
The second has some appeal, but feels somewhat under-motivated.
This issue is for discussion and feedback on this.
The text was updated successfully, but these errors were encountered: