2 ms·
> virtual calls are just an indirection into a vtable. Exactly, and `.prototype` is just a runtime and programmable vtable. You copy (by reference) everything
by zamalek 8y ago
> virtual calls are just an indirection into a vtable.
Exactly, and `.prototype` is just a runtime and programmable vtable. You copy (by reference) everything from the base prototype and replace (override) every member that you need to. You can even call overridden methods with `BaseType.prototype.foo.call(this, ...)`.