[swift-evolution] Lambda function syntax

Craig Cruden ccruden at novafore.com
Tue Dec 22 20:34:27 CST 2015


I would prefer the type definition for functions return type to be the same syntax as the type definition for parameters - which would leave the arrows for things like lambdas.

i.e. 

   func test(symbol: String): Bool {

   }


> On 2015-12-23, at 9:30:24, Andrey Tarantsov via swift-evolution <swift-evolution at swift.org> wrote:
> 
> So I believe the opinion of the core team and the community would be generally in opposition to the style you want. I understand your arguments, but somehow they are against the entire experience of me (and, presumably, others) as developers.
> 
> To continue our friendly banter, though, do you mind sharing your background? When I read this, I wasn't sure if you're serious or trolling:
> 
>> I would propose changing it from:
>> 
>> { (param_list) -> return_type in … }
>> 
>> to something cleaner like:
>> 
>> (param_list) -> return_type => { … }
> 
> I wonder if doing something like Haskel a lot makes you more used to that sort of arrow constructs?
> 
> This is written in good faith; I hope I used the right tone to indicate that.
> 
> A.
> 
> _______________________________________________
> 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