O'Reilly logo
  • Karl Giesing thinks this is interesting:

All we really care about is that the XYZ object delegates to the Task object


Cover of You Don't Know JS: this & Object Prototypes


But this is not guaranteed, or even implied. If you, as a function, are being passed an XYZ object, you neither know nor care that any of its methods are delegating to the Task object. Why confuse things by also requiring that the XYZ object inherit (through the prototype chain) the other methods of the Task object?