On 11/14/2011 12:16 PM, Allen Wirfs-Brock wrote:
/UnaryExpression/ :
*class* /UnaryExpression/
...

The semantics are:
1. if /UnaryExpression/ is undefined or null, return the value of 
/UnaryExpression/.
2. Let /obj/ be ToObject(/UnaryExpression/)
3. Return the result of calling the [[Get]] internal method of /obj/ with 
argument 'constructor'

Using the class Operator

Prefixing an object exemplar with the class operator turns it into a class 
exemplar:

let Point = class {
x:0,
y,0,
constructor(x,y} {
this.x=x;
this.y=y;
}
};

I don't understand what you're accomplishing here.  The above appears to be 
equivalent (modulo the typos) to:

let Point = function(x, y) {
  this.x = x;
  this.y = y;
};

The other stuff inside the class is ignored.

    Waldemar
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to