Skip to content

Commit 0d96586

Browse files
[SE-0453] InlineArray proposal is accepted
1 parent 8b38f17 commit 0d96586

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

proposals/0453-vector.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* Proposal: [SE-0453](0453-vector.md)
44
* Authors: [Alejandro Alonso](https://github.com/Azoy)
55
* Review Manager: [Freddy Kellison-Linn](https://github.com/Jumhyn)
6-
* Status: **Active review (December 5...December 17, 2024)**
6+
* Status: **Accepted**
77
* Roadmap: [Approaches for fixed-size arrays](https://forums.swift.org/t/approaches-for-fixed-size-arrays/58894)
88
* 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))
1010

1111
## Introduction
1212

@@ -82,7 +82,7 @@ member it will be inline allocated on the heap with the rest of the properties.
8282
alone.
8383

8484
```swift
85-
func complexAlgorithm() -> Int {
85+
func complexAlgorithm() {
8686
// This is a stack allocation, no 'malloc's or reference counting here!
8787
let elements: InlineArray<4, Int> = [1, 2, 3, 4]
8888

@@ -215,10 +215,10 @@ func array<T>(_: [T]) {}
215215
array([1, 2, 3]) // passes a Swift.Array
216216
array([1, 2, 3] as InlineArray<3, Int>) // error: 'InlineArray<3, Int>' is not convertible to 'Array<Int>'
217217

218-
func InlineArray<T>(_: InlineArray<3, T>) {}
218+
func inlineArray<T>(_: InlineArray<3, T>) {}
219219

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>'
222222
```
223223

224224
I discuss later about a hypothetical `ExpressibleByInlineArrayLiteral` and the design
@@ -276,7 +276,7 @@ extension InlineArray where Element: ~Copyable {
276276
/// Initializes every element in this InlineArray by running the closure with the
277277
/// previously initialized element.
278278
///
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
280280
/// count of the InlineArray, to initialize every element by passing the closure
281281
/// an immutable borrow reference to the previously initialized element. The
282282
/// closure is allowed to throw an error at any point during initialization at

0 commit comments

Comments
 (0)