News for hackers. Stuff that matters.
Re:ES6 in Depth: Classes by pags on Thursday July 23, 2015 @11:55PM (#9940038)

  static set circlesMade(val) {
    this._count = val;
  };
What's the value of "this" here?
Re:ES6 in Depth: Classes by dsp1234 on Friday July 24, 2015 @12:07AM (#9940063)
It's the class constructor function.

Something like:

  Function Circle(){}
  
  Circle.circlesMade(val) = function circlesMade(val){
    this._count = val;
  }
Re:ES6 in Depth: Classes by pags on Friday July 24, 2015 @12:17AM (#9940085)
That's strange, coming from Java.
Re:ES6 in Depth: Classes by dsp1234 on Friday July 24, 2015 @12:24AM (#9940097)
That's a validation of some of the other discussion in the thread. JavaScript gets a 'class' keyword, but it's really just syntactic sugar over prototypical inheritance. So there is some misunderstanding about what it does and doesn't do.

That said, it could have also been written as:

  static set circlesMade(val) {
        Circle._count = val;
  };
which means the exact same thing, and would maybe help people to understand that "_count" is just like a static class property on the Circle "class"