> On Apr 6, 2017, at 2:39 PM, Joe Groff via swift-evolution 
> <[email protected]> wrote:
> 
> for key in [\Vector.x, \.y, \.z, \.w] {
>       a[key] += b[key]
> }

Sorry to derail slightly, but I'd love to see a key path type shorthand—perhaps 
something like:

        for key: \Vector: Int in [\.x, \.y, \.z, \.w] {
                …
        }

It's probably something we should defer until we know more about how frequently 
people use key paths, though.

-- 
Brent Royal-Gordon
Architechies

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

Reply via email to