2 ms·
I don't think so. "Prototype-based programming is a style of object-oriented programming in which behavior reuse (known as inheritance) is performed via a proc
by frik 11y ago
I don't think so.
"Prototype-based programming is a style of object-oriented programming in which behavior reuse (known as inheritance) is performed via a process of cloning existing objects that serve as prototypes. This model can also be known as prototypal, prototype-oriented, classless, or instance-based programming."
In class based programming you have the fragile base-class problem, as the OP mentioned. Prototype based programming is more powerful and you could emulate class based programming in it (as is done in ES6 with the new "class" syntactic sugar).
- wtetzner 11y agoI don't see how prototype-based programming solves the fragile base-class problem. Instead you just have the fragile "base-object" problem.