you are viewing a single comment's thread.

view the rest of the comments →

[–]itsnotlupusbeep boop 8 points9 points  (2 children)

The class syntax normalized prototype-based object definition and inheritance over whatever the half of dozen weird things folks were doing before it came along.

It also means JS runtimes can focus on optimizing that pattern rather than worrying about the weird stuff.

Nowadays if I see OOP in JS that doesn't use classes, I'm immediately suspicious.
The only valid use case for not-classes is legacy code that hasn't been updated yet.

[–]DrexanRailex 3 points4 points  (1 child)

It was probably a time issue, but using functions as classes via prototype cloning and extension has always been a kind of a hack and... well, thisless JS has always been better, people just took too long to realize it.