Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> As a javascript programmer, I have perceived es6 "classes" as nothing but syntactic sugar.

That's basically what they are.

> You can still create anonymous objects quickly, and use any object as prototype for another.

Hell you can create anonymous objects even faster with ES6 since object literals also get the short method notation and computed properties.



Yes, but let's admit it, the presence of classes will inevitably lead to their ever-presence, if only for the fact that they are what most people coming from other languages are used to.


The absence of class already leads to their ever presence, each project simply reimplements its own instead of using the built-in syntactic sugar. The class sugar is simply a way for the creation of (prototype + constructor) pairs not to be a pain in the ass, nothing more and nothing less.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: