[swift-evolution] Sparse (fixed-size) array literal syntax

Daryle Walker darylew at mac.com
Fri Jun 2 03:02:48 CDT 2017


> On Jun 2, 2017, at 3:56 AM, Jaden Geller <jaden.geller at gmail.com> wrote:
> 
> Why would this not be possible with fixed sized arrays? Theoretically you could create a type that wrapped a fixed array and make it conform to whatever protocol you want, including the “ExpressibleBy” protocols.

I DO want it to be possible with future fixed-sized arrays. This is not a user-side question, but implementor-side. I’m asking if the parsing routines for it would conflict with the current array- and dictionary-literal rules, since they will co-exist. If this syntax would make determining whether we have an enhanced array literal or a dictionary literal too hard, then we should change it before anything is finalized.

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



More information about the swift-evolution mailing list