Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

> unless you mean prototype based inheritance which is very different beast

All inheritance in JS is prototype based inheritance. The class syntax is just syntax sugar prototypes. In theory you can do all sorts of crazy things with prototypes. In practice people use them just like classes. The reason people don't use inheritance in JS has nothing to do with browser support.



view as:

> All inheritance in JS is prototype based inheritance. The class syntax is just syntax sugar prototypes.

And async/await is promise based yet it results in quite different programming style. It doesn't matter which primitives are used for feature implementation.

> The reason people don't use inheritance in JS has nothing to do with browser support.

I don't think so. Since the advent of ES6/Babel/TypeScript I see inheritance on frontend daily.


Legal | privacy