As far as almost every major JavaScript framework coming with it's own style/approach to inheritance -- I don't blame the frameworks, I blame JavaScript.
Inheritance in JS is at best awkward and unintuitive; if this wasn't the case you wouldn't have so many people trying to fix it. And let me just add that it's not this way because it isn't "classical", it's because it's also not really "prototypal" either. The awkward in-between mix of the two approaches means that no one can decide which, if any, direction is the "true one" to go in.
You have a bunch of people claiming theirs is the fastest and how JS is designed, but then others are claiming theirs is more elegant and fits better with JavaScript's semantics, then another focusing on how inheritance would have been had they probably not decided in the last minute that "oh no, this is too weird, it needs to be more like Java".
I just find it quite ridiculous because I can't think of another language that has these types of problems over something as fundamental and basic as inheritance in an OO language.
I'd agree that I find the inheritance model JS's primary faltering. I really wish they had decided to follow the same ECMAScript standard that Actionscript 3 followed in that I find AS3 to essentially just be Javascript with some simple and sane OOP constructs.
2 comments
[ 6.9 ms ] story [ 17.2 ms ] threadInheritance in JS is at best awkward and unintuitive; if this wasn't the case you wouldn't have so many people trying to fix it. And let me just add that it's not this way because it isn't "classical", it's because it's also not really "prototypal" either. The awkward in-between mix of the two approaches means that no one can decide which, if any, direction is the "true one" to go in.
You have a bunch of people claiming theirs is the fastest and how JS is designed, but then others are claiming theirs is more elegant and fits better with JavaScript's semantics, then another focusing on how inheritance would have been had they probably not decided in the last minute that "oh no, this is too weird, it needs to be more like Java".
I just find it quite ridiculous because I can't think of another language that has these types of problems over something as fundamental and basic as inheritance in an OO language.