Skip to content

Commit 89a68a0

Browse files
authored
Clarify that changing unlabeled Array subscript access is the commonly rejected change. (swiftlang#1449)
1 parent 8ddfdd2 commit 89a68a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commonly_proposed.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Several of the discussions below refer to "C family" languages. This is intended
1818

1919
## Strings, Characters, and Collection Types
2020

21-
* Make `Array<T>` subscript access return `T?` or `T!` instead of `T`: The current array behavior is [intentional](https://forums.swift.org/t/proposal-add-safe-subquence-access-via-subscript-for-colloctiontype/516/7), as it accurately reflects the fact that out-of-bounds array access is a logic error. Changing the current behavior would slow `Array` accesses to an unacceptable degree. This topic has come up [multiple](https://forums.swift.org/t/proposal-add-safe-subquence-access-via-subscript-for-colloctiontype/516/5) times before but is very unlikely to be accepted.
21+
* Change `Array<T>` subscript access to return `T?` or `T!` instead of `T`: The current array behavior is [intentional](https://forums.swift.org/t/proposal-add-safe-subquence-access-via-subscript-for-colloctiontype/516/7), as it accurately reflects the fact that out-of-bounds array access is a logic error. Changing the current behavior would slow `Array` accesses to an unacceptable degree. Changing the unlabeled array subscript to return an optional has come up [multiple](https://forums.swift.org/t/proposal-add-safe-subquence-access-via-subscript-for-colloctiontype/516/5) times before and is very unlikely to be accepted.
2222

2323
## Control Flow, Closures, Optional Binding, and Error Handling
2424

0 commit comments

Comments
 (0)