During the 2026-05-06 TG2 call, we had a lengthy discussion about whether record is a modifier on a class/struct, or a different type entirely. We ended up with the following position:
- We'll treat
record as a modifier. (This is how it is currently treated in Draft PR #1458.)
- Add a new subclause to the end of 15, “Classes” that describes the diffs between a record class and a non-record class, and remove from the current Draft PR mentions of “record [class]” in earlier subclauses in that clause. This allows all information about a record class to be found in one subclause rather than it being spread around multiple earlier subclauses. A reader of the earlier subclauses not interested in record classes will no longer be distracted by text on that topic.
- [Repeat for structs] Add a new subclause to the end of 16, “Structs” that describes the diffs between a record struct and a non-record struct, and remove from the current Draft PR mentions of “record struct” in earlier subclauses in that clause. This allows all information about a record struct to be found in one subclause rather than it being spread around multiple earlier subclauses. A reader of the earlier subclauses not interested in record structs will no longer be distracted by text on that topic.
The reorganization needs to accommodate the following:
- Addition of record classes in V9.
- Addition of record structs in V10.
- Allowance of primary constructors in non-record classes/structs in V12.
During the 2026-05-06 TG2 call, we had a lengthy discussion about whether
recordis a modifier on a class/struct, or a different type entirely. We ended up with the following position:recordas a modifier. (This is how it is currently treated in Draft PR #1458.)The reorganization needs to accommodate the following: