3 ms·
so languages like self and javascript which, even in the modern forms, have no real classes are not oo to you? i mean, the fact that you can use class style sy
by ferzul 6y ago
so languages like self and javascript which, even in the modern forms, have no real classes are not oo to you?
i mean, the fact that you can use class style syntax do define object constructors in javascript and tho result is fairly coherent, seems to suggest that classes are not inherent to oo.
also, the fact that it's called “object oriented” not “classical”.
other examples of non-oo with strict encapsulation includes haskell, where if you lack the constructor, you can only use it according to the public api. it also uses single dispatch for typeclasses.
complex inheritance rare in oo - mostly only single inheritance is supported - and most oo design advocates pretty much say “don't use inheritance”. so it doesn't seem like it's intrinsic.