[swift-evolution] [Pitch] New Version of Array Proposal
davesweeris at mac.com
Tue Aug 1 16:49:38 CDT 2017
> On Aug 1, 2017, at 10:54 AM, Daryle Walker via swift-evolution <swift-evolution at swift.org> wrote:
> A tuple can have its members initialized in piecemeal and still satisfy deterministic initialization. The named types need to do all their sub-objects' initializations before any designated initializer ends. I want the former for array instances, not the latter. It’s important for numeric applications, so math arrays don’t have to be set twice, once for an arbitrary default and again for the real data.
Eh? What do you mean by "initialized in piecemeal"? These both give errors:
let x:(Int, Int) = (0) // something about not being able to convert `Int` to `(Int, Int)`
let x:(Int, Int) = (0, _) // something about "_" only being allowed in patterns
Is that what you're talking about?
- Dave Sweeris
More information about the swift-evolution