Swift style syntax

Waldemar Horwat waldemar at google.com
Tue Oct 13 19:56:25 UTC 2015


On 10/13/2015 10:27, Isiah Meadows wrote:
> Steve, I have little problem with whatever ends up the case, as long as it's shorter than `(x, y) => x + y`. The current idea was inspired by Swift's `list.sort(>)` and `list.reduce(0, +)`.

I second the concern with this being far too full of hazards to carry its weight.  Let's say you allow something like the list.reduce(0, +) syntax for the various arithmetic operators.  Then we get to the fun ones:

list.reduce(0, /) /x

Oops, you've just started a regular expression.

     Waldemar



More information about the es-discuss mailing list