Alternative syntax for <|

Russell Leggett russell.leggett at
Tue Nov 15 22:27:33 PST 2011

Given the recent conversation about class as operator and its likely
composition with <|, I propose turning the syntax:

    *MemberExpression* <| *ProtoLiteral*


    extends *MemberExpression ProtoLiteral*

In the common case of using the class operator, it would read much more

    let Point2d = class extends Point {

or how I propose it, allow using a name, and define it:

    class Point2d extends Point {
    //which can be grouped as
    class Point2d (extends Point {

Non-class uses of the syntax might seem a little bit odd

    let specialArray = appBehavior <| [0,1,2,3,4,5]
    let specialArray = extends appBehavior [0,1,2,3,4,5]

but given the overall disapproval of the exact syntax of the <| operator, I
think its at least a little more obvious what is going on.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list