> In this mail I’m answering several statements made in this thread by 
> different people, not only Brent’s mail from which I just picked the 
> following snippet:
> 
>> let names = people.map => person { person.name }
> 
> For me that is more difficult to read than
> 
>       let names = people.map { person in person.name }
> 
> Especially when chaining is used, i.e.
> 
>       let names = people.filter => person { person.isFriend }.map => person { 
> person.name }
> 
> (or would I have to add parentheses somewhere with this proposed syntax?)
> 
> vs.
> 
>       let names = people.filter { person in person.isFriend }.map { person in 
> person.name }
> 

I said in the email that => is too visually heavy for this role.

Here's something lighter, although I'm still not satisfied with it, and not 
seriously suggesting it:

        let names = people.map ~ person { person.name }

Or even:

        let names = people.map \person { person.name }

However, I'm really struggling to find anything that I actually like here. This 
may be one of those cases where we dislike what's there and explore a bunch of 
options, only to find out that the current thing actually is the least bad 
alternative after all.

-- 
Brent Royal-Gordon
Architechies

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

Reply via email to