|
|
|
|
|
by anonymoushn
4689 days ago
|
|
Well, it would help my understanding if you could elaborate on your disagreement rather than just saying that you disagree. The additional constraint of not creating a new object system prevents me from making OO of any kind at all in C, but leaves most scripting languages that implement "classical inheritance" very open to implementing "prototypal inheritance". This is partly because they actually use "prototypal inheritance" and expose a "classical interface" as the primary one, so fiddling with __mro__ feels a little like cheating. If I want to avoid fiddling with the existing __mro__ and build my own, I can override __getattribute__. This certainly doesn't feel like making a new object system to me, but it also doesn't feel substantially different from overriding [] in C++. |
|
But a static OO language can faithfully reproduce the operational semantics of prototypal inheritance.