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

We somewhat arbitrarily chose to have AuthController delegate to LoginController; it would have been just as valid for the delegation to go the reverse direction.


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


Except "neither AuthController nor LoginController are specializing base behavior of the other, so inheritance between them makes little sense." Why does a delegate relationship make any more sense? (Hint: It doesn't.)