[swift-evolution] Lambda function syntax
Alexander Regueiro
alexreg at gmail.com
Tue Dec 22 20:16:06 CST 2015
Disagree, disagree, disagree. Don’t see any logic to that.
On 23 Dec 2015, at 02:10, Andrey Tarantsov <andrey at tarantsov.com> wrote:
>
> Can't help commenting...
>
>> I can only see subjective “dislike this”.
>
> The feel of the language is very important. We're talking about improving the syntax to look better here, so of course the subjective look of it matters most.
>
>> Using “func” or “lambda” outside is uglier than “in” inside the braes? Really?
>
> A thousand times yes. "in" is unfortunate, but adding a keyword would be... backwards doesn't quite capture it. It would destroy a big portion of the fun of the entire language.
>
>> And closures are really *not* control flow statements, so treating like them is just a fallacy and source of confusion.
>
> ...but it looks and reads very good. ;-)
>
>
> The only thing that I find wrong is "in". It just doesn't look delimited enough. foo.map { bar in bar.boz} is heavy on the eyes, while foo.map { |bar| bar.boz } would be ideal.
>
> A man can dream, right?
>
> Honestly, I think I understand the tradeoffs involved, so I'm fine with letting that "in" be.
>
> A.
>
More information about the swift-evolution
mailing list