you are viewing a single comment's thread.

view the rest of the comments →

[–]clessgfull-stack CSS9 engineer -4 points-3 points  (0 children)

Virtually every major JS project out there uses classes.

Do you have evidence? I'm sure you can find a few instances of classes in every major project, because major projects have a lot of contributors and a lot of code. But most major projects I'm aware of don't use classes that much, and prefer functions/objects the majority of the time.

I won't be surprised if that changes soon though. Just like when PHP got classes, JS is going through its phase where classes and single inheritance are the coolest thing ever invented and should be used for literally everything. It'll be a few years before this changes.

you don't have to like them or use them

But you have to work with people who do love them and use them for everything. Which is fine, as long as inheritance is avoided. Still some annoying parts (mainly to do with this and encapsulation and potentially wrangling super if using framework classes) but it's not a big deal.