Skip to content

Commit 09c9455

Browse files
committed
Merge alternatives
1 parent b8cd942 commit 09c9455

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

proposals/p5434.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4343
- [Alternatives considered](#alternatives-considered)
4444
- [No `ref`, only pointers](#no-ref-only-pointers)
4545
- [Remove pointers after adding references](#remove-pointers-after-adding-references)
46-
- [References in the type system](#references-in-the-type-system)
47-
- [Allow `ref` bindings in the fields of classes](#allow-ref-bindings-in-the-fields-of-classes)
46+
- [Allow `ref` bindings in the fields of classes](#allow-ref-bindings-in-the-fields-of-classes)
4847
- [No call-site annotation](#no-call-site-annotation)
4948
- [Top-level `ref` introducer](#top-level-ref-introducer)
5049
- [`ref` as a type qualifier](#ref-as-a-type-qualifier)
@@ -1097,14 +1096,7 @@ One of the features of a reference is what it cannot do, and we would have to
10971096
remove those restrictions to be able to satisfy the pointer use cases with
10981097
references.
10991098

1100-
### References in the type system
1101-
1102-
C++ includes references in its object type system, but not as the type of
1103-
expressions. The main downside to this is that references end up having a number
1104-
of limitations and rules that other types don't have, such as there are no
1105-
references of references.
1106-
1107-
#### Allow `ref` bindings in the fields of classes
1099+
### Allow `ref` bindings in the fields of classes
11081100

11091101
A type with reference binding fields would need a lot of restrictions since
11101102
reference bindings are not assignable. We did not see enough motivation to put
@@ -1155,6 +1147,9 @@ but tuples already can't represent `var` or compile-time parameters. We have
11551147
other plans for this, instead of trying to stretch tuples to encompass these use
11561148
cases.
11571149

1150+
We also noted that including references in the type system led to a number of
1151+
inconsistencies in C++, such as no there not being references of references.
1152+
11581153
### `bound` would change the default return to `let`
11591154

11601155
We considered saying that `bound` would change the default return to use the

0 commit comments

Comments
 (0)