|
3 | 3 | * Proposal: [SE-0453](0453-vector.md)
|
4 | 4 | * Authors: [Alejandro Alonso](https://github.com/Azoy)
|
5 | 5 | * Review Manager: [Freddy Kellison-Linn](https://github.com/Jumhyn)
|
6 |
| -* Status: **Active review (December 5...December 17, 2024)** |
| 6 | +* Status: **Accepted** |
7 | 7 | * Roadmap: [Approaches for fixed-size arrays](https://forums.swift.org/t/approaches-for-fixed-size-arrays/58894)
|
8 | 8 | * Implementation: [swiftlang/swift#76438](https://github.com/swiftlang/swift/pull/76438)
|
9 |
| -* Review: ([pitch](https://forums.swift.org/t/vector-a-fixed-size-array/75264)) ([review](https://forums.swift.org/t/se-0453-vector-a-fixed-size-array/76004)) ([returned for revision](https://forums.swift.org/t/returned-for-revision-se-0453-vector-a-fixed-size-array/76411)) ([second review](https://forums.swift.org/t/second-review-se-0453-vector-a-fixed-size-array/76412)) |
| 9 | +* Review: ([pitch](https://forums.swift.org/t/vector-a-fixed-size-array/75264)) ([first review](https://forums.swift.org/t/se-0453-vector-a-fixed-size-array/76004)) ([returned for revision](https://forums.swift.org/t/returned-for-revision-se-0453-vector-a-fixed-size-array/76411)) ([second review](https://forums.swift.org/t/second-review-se-0453-vector-a-fixed-size-array/76412)) ([acceptance](https://forums.swift.org/t/accepted-with-modifications-se-0453-inlinearray-formerly-vector-a-fixed-size-array/77678)) |
10 | 10 |
|
11 | 11 | ## Introduction
|
12 | 12 |
|
@@ -82,7 +82,7 @@ member it will be inline allocated on the heap with the rest of the properties.
|
82 | 82 | alone.
|
83 | 83 |
|
84 | 84 | ```swift
|
85 |
| -func complexAlgorithm() -> Int { |
| 85 | +func complexAlgorithm() { |
86 | 86 | // This is a stack allocation, no 'malloc's or reference counting here!
|
87 | 87 | let elements: InlineArray<4, Int> = [1, 2, 3, 4]
|
88 | 88 |
|
@@ -215,10 +215,10 @@ func array<T>(_: [T]) {}
|
215 | 215 | array([1, 2, 3]) // passes a Swift.Array
|
216 | 216 | array([1, 2, 3] as InlineArray<3, Int>) // error: 'InlineArray<3, Int>' is not convertible to 'Array<Int>'
|
217 | 217 |
|
218 |
| -func InlineArray<T>(_: InlineArray<3, T>) {} |
| 218 | +func inlineArray<T>(_: InlineArray<3, T>) {} |
219 | 219 |
|
220 |
| -InlineArray([1, 2, 3]) // passes a Swift.InlineArray |
221 |
| -InlineArray([1, 2, 3] as [Int]) // error: 'Array<Int>' is not convertible to 'InlineArray<3, Int>' |
| 220 | +inlineArray([1, 2, 3]) // passes a Swift.InlineArray |
| 221 | +inlineArray([1, 2, 3] as [Int]) // error: 'Array<Int>' is not convertible to 'InlineArray<3, Int>' |
222 | 222 | ```
|
223 | 223 |
|
224 | 224 | I discuss later about a hypothetical `ExpressibleByInlineArrayLiteral` and the design
|
@@ -276,7 +276,7 @@ extension InlineArray where Element: ~Copyable {
|
276 | 276 | /// Initializes every element in this InlineArray by running the closure with the
|
277 | 277 | /// previously initialized element.
|
278 | 278 | ///
|
279 |
| - /// This will call the closure 'count' times, where 'count' is the static |
| 279 | + /// This will call the closure `count - 1` times, where `count` is the static |
280 | 280 | /// count of the InlineArray, to initialize every element by passing the closure
|
281 | 281 | /// an immutable borrow reference to the previously initialized element. The
|
282 | 282 | /// closure is allowed to throw an error at any point during initialization at
|
|
0 commit comments