Hi, Maybe it could be possible to allow operator-like characters to be included in the methods names? Like:
Math.> It seems clear and readable. I believe it could be parsed easily, too. Transpilers could just change it to Math['>']. Or, maybe allow to use some kind of new syntax (easy to parse for transpilers), to explicitly inform the parser we want to use operator as a function? Say: myArray.sort(:>) I think both propositions fix the problem Waldemar mentioned. Cheers, Dawid 2015-10-13 21:56 GMT+02:00 Waldemar Horwat <[email protected]>: > 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 > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

