@@ -43,8 +43,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
43
43
- [ Alternatives considered] ( #alternatives-considered )
44
44
- [ No ` ref ` , only pointers] ( #no-ref-only-pointers )
45
45
- [ 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 )
48
47
- [ No call-site annotation] ( #no-call-site-annotation )
49
48
- [ Top-level ` ref ` introducer] ( #top-level-ref-introducer )
50
49
- [ ` 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
1097
1096
remove those restrictions to be able to satisfy the pointer use cases with
1098
1097
references.
1099
1098
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
1108
1100
1109
1101
A type with reference binding fields would need a lot of restrictions since
1110
1102
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
1155
1147
other plans for this, instead of trying to stretch tuples to encompass these use
1156
1148
cases.
1157
1149
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
+
1158
1153
### ` bound ` would change the default return to ` let `
1159
1154
1160
1155
We considered saying that ` bound ` would change the default return to use the
0 commit comments