Conversation
|
As one data point, there are no uses of |
|
+1. We should keep |
|
isn't struct inheritance hidden behind an feature gate? If so, why does it require a RFC to be removed? thats the point of feature gates. they may be removed at any time.... |
|
@sinistersnare A few months ago we made a change in policy to require RFCs when removing any language features, even if feature-gated. See this policy. In general, we want to go through the formal feedback and decision process to change the direction on major features, whether adding or removing them. |
|
+1. This seems like a generally unused feature that will probably be made unneeded by one of the many inheritance proposals. |
|
Merged as RFC 71. Discussion. Tracking. |
Summary
Removes the "virtual struct" (aka struct inheritance) feature, which is currently feature gated.
Motivation
Virtual structs were added experimentally prior to the RFC process as a way of inheriting fields from one struct when defining a new struct.
The feature was introduced and remains behind a feature gate.
The motivations for removing this feature altogether are:
Detailed design
Remove the implementation and feature gate for virtual structs.
Retain the
virtualkeyword as reserved for possible future use.Drawbacks
The language will no longer offer any built-in mechanism for avoiding repetition of struct fields. Macros offer a reasonable workaround until a more general mechanism is added.
Unresolved questions
None known.