Please see http://wiki.ecmascript.org/doku.php?id=harmony:proto_operator -- the <| operator grammatically requires only literal object forms on its right.
/be ----- Original Message ----- From: "Herby Vojčík" <[email protected]> To: [email protected] Sent: Friday, December 16, 2011 9:57:45 AM Subject: <| ambiguity Hello, I have read some articles on wiki.ecmascript.org as well as some post here. It seems <| operator (which I only recently understood that it was probably meant to be the generalization arrow hollow top turned sideways :-) ) is used two ways. As I understand, it was proposed (and I am with this semantics) so as proto <| obj is roughly equivavlent with Object.create(proto)... // with elements of obj added But I saw many uses like Car <| { ... } Car <| class Truck {...} Truck <| { ... } where Car and Track are classes (constructor methods), not prototypes. So which is the right semantics? Thanks, Herby P.S.: Maybe have two operators, <| for Object.extend semantics and <<|, <|| or <|= for the "raw instantiating" / subclassing one? _______________________________________________ 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

