[swift-evolution] [Review] SE-0090: Remove .self and freely allow type references in expressions

Matthew Johnson matthew at anandabits.com
Wed May 18 14:47:49 CDT 2016


> On May 18, 2016, at 1:33 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> I thought about this, but { $0 } is already a fairly compact way to express the identity function.
> 
> It is, but I worry a bit about the core team's tendency to say "Oh, just use a closure" whenever something like this comes up. A function/method/property name can be merely *read*; a closure must be *interpreted*. And writing closures is error-proneā€”a slip of the keys and you've written `{ 0 }` or `{ 40 }` instead of `{ $0 }`, which look similar and (soon will) work in the same expressions but behave completely differently.
> 
> Naming operations is powerful; it helps you understand them better and it helps you avoid fat-fingering them.

+1

> 
> -- 
> Brent Royal-Gordon
> Architechies
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list