Alternative syntax for <|
Russell Leggett
russell.leggett at gmail.com
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*
into
extends *MemberExpression ProtoLiteral*
In the common case of using the class operator, it would read much more
naturally:
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]
//becomes
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: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111116/cd9d2e22/attachment.html>
More information about the es-discuss
mailing list