News for hackers. Stuff that matters.
Re:A Picture of Java in 2020 by nicoburns on Tuesday September 22, 2020 @07:28AM (#24553255)
> That's an extremely optimistic view.

I haven't seen inheritance more than one level deep in JavaScript for years. And most code isn't using it at all.

Re:A Picture of Java in 2020 by The_Colonel on Tuesday September 22, 2020 @11:26AM (#24555591)
Inheritance in JS is not widely used since even the concept of classes is still very new and technically not safe for use (not supported in IE), not because JS devs are somehow wiser and self-limiting themselves to one level inheritance.

(unless you mean prototype based inheritance which is very different beast)

Re:A Picture of Java in 2020 by nicoburns on Tuesday September 22, 2020 @11:59AM (#24556092)
> 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.

Re:A Picture of Java in 2020 by The_Colonel on Tuesday September 22, 2020 @02:43PM (#24558291)
> 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.