Skip to content

Comment on ES6 in Depth: Destructuringparent

Comments

I really wanted people to figure out how to make prototype systems work for them but either the web browser isn't the best context for them or people are just too used to class-based systems. I looked at Self and it was neat but I haven't seen any larger or shorter-lived programs that take advantage of the prototype-based system.

Prototype-type based systems are cool in theory, but aren't much fun to use in practice. They are incredibly powerful and easy to abuse. Basically single inheritance in disguise.

Classes aren't great either, but at least using class inheritance makes you feel icky, you're not likely to have shared state on the prototype being randomly mutated, and it's pretty readable.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.