On May 29, 2017, at 3:21 AM, Rod Brown <[email protected]> wrote:

While I can’t comment about the technical details, I have to say, this looks really “unswifty” to my eye. I’d probably expect something more along the lines of:

let x: FixedArray<Int> = [1, 2, 3]

or:

let y: StaticArray<Int> = [1, 2, 3]

Generic syntax is intentionally not used. It has the same problem that the tuple-appearing suggestion I wrote last time had: expanding nested arrays going inward instead of rightward looks awful.

Are these examples supposed to be array-segment references? Otherwise you’re missing the extent length. (Remember: generics only take in types; we don’t do value-based generic parameters like C++ does (yet).) We could put in a rule that a array-segment reference that is initialized with an array _expression_ can be freely converted/considered to be an immediate array of the same type and now-explicit length.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to