Actually this is a terminology war. Your definition of OOP is that it cannot contain the perfectly legitimate ECMA compliant Class. The reason, you say, is because it's internal implementation uses the prototype inheritance
(PI) system. Which you refer to as inheritance and call 'syntactic sugar'.
Nonsense. The word inheritance alone, as used above does not mean PI. Google and 25 years of OOP show that clearly. Besides OOP folks don't favor inheritance, they favor composition, just like Javascript does.
Besides all OOP winds up at small reusable functions anyway. It's much cleaner and easier to use the class than writing out verbose PI statements for properties.
Making a statement like 'not good for small projects' in my mind, is only a Javascript centric way of thinking. Using the Class construct is legit and ultimately has zero run time performance effects. For many OOP centric people it's a preferred choice. Besides sugar in any form is sweet.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Actually this is a terminology war. Your definition of OOP is that it cannot contain the perfectly legitimate ECMA compliant Class. The reason, you say, is because it's internal implementation uses the prototype inheritance
(PI) system. Which you refer to as inheritance and call 'syntactic sugar'.
Nonsense. The word inheritance alone, as used above does not mean PI. Google and 25 years of OOP show that clearly. Besides OOP folks don't favor inheritance, they favor composition, just like Javascript does.
Besides all OOP winds up at small reusable functions anyway. It's much cleaner and easier to use the class than writing out verbose PI statements for properties.
Making a statement like 'not good for small projects' in my mind, is only a Javascript centric way of thinking. Using the Class construct is legit and ultimately has zero run time performance effects. For many OOP centric people it's a preferred choice. Besides sugar in any form is sweet.