[swift-evolution] Lambda function syntax

Pierre Monod-Broca pierre at monod-broca.fr
Thu Dec 24 04:16:45 CST 2015


I'm completely against replacing '->' by ':' it would make unreadable the declaration of a function taking a closure as parameter, or returning one (among other things).

-- 
Pierre

> Le 23 déc. 2015 à 18:07, Alexander Regueiro via swift-evolution <swift-evolution at swift.org> a écrit :
> 
> Virtually everyone agrees `=>` is a much clearer delimiter/separator. `in` is too textual and not easy enough to distinguish from following code.
> 
> Also, other languages (e.g. C#) have no problem with the `=>` symbol, as anyone with even a little experience programming knows greater-than-or-equal to is `>=`.
> 
> However, if we adopt the new function type specifier syntax (replacing `->` with `:` for the return type), then `->` could be used in place of the `in` keyword, to make you happier.
> 
>> On 23 Dec 2015, at 04:11, Ricardo Parada <rparada at mac.com> wrote:
>> 
>> 
>> 
>> I think "in" is slightly easier to type in than "=>". 
>> The => may be interpreted as equal or greater than.
>> 
>> 
>> On Dec 22, 2015, at 9:52 PM, Andrey Tarantsov via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>>>> And yes, I certainly would prefer `=>` rather than `in`.
>>> 
>>> It seems like the community can actually agree on this.
>>> 
>>> Does anyone know if it has any parsing problems / grammar implications right now? 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151224/58941636/attachment.html>


More information about the swift-evolution mailing list