News for hackers. Stuff that matters.
Re:JavaScript: prototype vs. class by danShumway on Wednesday April 04, 2018 @11:35AM (#16755693)
Both options will break mixins.

  function CatDog () {
     Cat.apply(this, arguments);
  }

  CatDog.prototype = Object.assign(Dog.prototype, Cat.prototype);
In the above example, CatDog is not an instance of Cat, since it never actually inherits from the Cat prototype.

There are no comments on this comment yet.