Hello Swift community,
The initial review of SE-0453: Vector, a fixed size array concluded on 27 November, 2024. Feedback was positive on the introduction of the type overall, but a number of important issues were raised that the Language Steering Group believe need to be addressed before the proposal can be accepted. The first review also specifically scoped out any discussion of the name Vector
, and that discussion does need to happen.
As such, the Language Steering Group has decided to accept the proposal in principle but return it for revision to address the points raised during review. Most substantively, the Group does not believe that the proposed change to C array import behavior has been sufficiently demonstrated to be sound in all cases, and so requests that this portion of the proposal be removed so that further design work and implementation exploration can be done.
A number of smaller changes are requested as well:
- The nested
Indices
typealias should be removed since it is not needed without theCollection
conformance. reduce(into:_:)
should be removed from the API surface. There does not appear to be sufficient confidence that this would not later interfere with the introduction of a similar method on borrowing container protocols.- For the proposed
init(unfold:with:)
initializer, the argument labels and behavior of the analogoussequence(first:next:)
function should be adopted—that is, the initializer should be calledinit(first:next:)
and the element passed tonext
on each call should be the previous element, not the first element as proposed. - The
init(expand:with:)
initializer. The LSG noted that there is nothing this initializer does which cannot be accomplished by simply capturing the mutable state and modifying it in the index-based initializer onVector
(and in fact such an approach is more general since it allows for further use of the final state value, rather than consuming it).
A second review of the proposal with these changes will be run imminently, and discussion of the name Vector
will be on-topic for this second review.
Thank you to everyone who participated for helping make Swift a better language!
Freddy Kellison-Linn
Review Manager