Yes, classes put developers in an object-oriented mindset which masks the true power of JavaScript, but I look forward to a future where JavaScript code bases aren’t composed of so many different styles. ES6 classes finally give us a clear, consistent, standardized pattern to follow. Clean code is about writing code for humans, so I favor the patterns that best convey my intent. While there are certainly risks of misuse, ES6 classes provide a practical, clear path for creating JavaScript applications in a consistent style.
In Defense of JavaScript Classes
Cory House
10916
Agree. And i’m also seeing more and more devs using Typescript because of its classes implementation and, therefore, its consistency. I think the Typescript roadmap, eventually, could give us a good reason to follow this pattern. I mean, today it’s all about maintenance and code organization. I’m fine with classes.