Re:New ES2019 JavaScript features
by BigJono on Thursday September 26, 2019 @08:20PM
(#21087165)
Or we could've considered it an opportunity to move people away from classical inheritance and towards something that's conceptually much simpler? (which both prototypal inheritance and functional programming are)
[ Parent
| on HN ]
Yet all successful functional programming languages do support doing OOP as well.
JS is and always was prototype based. The class keyword is as far as I know just syntax sugar that creates a prototype chain and a new-able function that assigns the prototype to self.
The '#privateVar' syntax means that classes are no longer simply syntax sugar, unfortunately.