But I didn't.
Special thanks to Mihai and Kushal for reading drafts of the inheritance article.
For example, slide 12 shows some sample code that calls
Extends("com.xopus.code.Animal")which has no apparent reference to the class doing the extending, so it is hard to imagine how calling
Extends()has the side-effect of providing
Animal's methods to
Monkey. Presumably, the compiler treats
Extends()as a preprocessor directive whereas Closure's
goog.inherits()will actually add the superclass's methods to the subclass's prototype. Closure generally relies on annotations, such as
@extends, for compiler directives rather than function calls. Closure code should always be executable in both raw and compiled modes.