Re:A minimalist approach to OOP in Javascript
by Jebus on Sunday April 08, 2012 @09:37AM
(#3813796)
Oh no, please not another OOP javascript tutorial without prototypes.
[ Parent
| on HN ]
Re:A minimalist approach to OOP in Javascript
by TazeTSchnitzel on Sunday April 08, 2012 @09:58AM
(#3813843)
What's wrong with not using prototypal inheritance? There are several styles of JavaScript OOP. You don't have to use constructor functions.
Unless you mean the .prototype property, in which case you really mean re-use of functions. That's something you can only use for unsafe public methods, unfortunately. For safe (uncompromisable) public methods it can't be used, nor can it for private or privileged methods.