On JavaScript Inheritance Performance - One Step Back
Few days ago I wrote a post about this argument , proposing an alternative "best option" way to use an injected parent in each method. As soon as more developers read my post, more sparkles came out from the fire: true classical inheritance simulation via missed methods in the chain, exception during methods execution that could trap the temporary injected parent, and other interesting stuff again. At the end of all these tests, benchmark, and libraries evaluation, I decided to step backward about my proposal, making things simple, logic, and extremely fast (as much as possible). My Conclusions if we inject a parent, we have to change and/or wrap the original method, adding noise in the execution and inevitably more operations to perform (read: less performances) for each inherited metod, even if it is the same of the parent one, we need to add functions and code which means more RAM and less portability more we over-mess the simple JavaScript inheritance stack, less control ...