4 ms·
Prototypes have become much more of an implementation detail in recent years. First of all, it’s just a single-handed point of view. I’m using them from time t
by wruza 5y ago
Prototypes have become much more of an implementation detail in recent years.
First of all, it’s just a single-handed point of view. I’m using them from time to time, because js doesn’t end with reactjs hooks or frontend, and even frontend doesn’t end with just writing “frontend glueware”.
But even if it did, what exact mechanism do you propose to bind methods to instances? Automagic? It’s not just an “implementation detail”, it is a way of doing OOP in dynamic languages. Do you want all your objects to contain references to bound copies of all of the inherited methods? The way it is is for a reason, and the reason is, it doesn’t come for free.