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

> I think you're mixing up your timelines. ES5 brought `Object.create` and other prototype helper methods.

You’re right, I did. So the actual timeline was somewhat less dim than I remembered.

> The `class` keyword was introduced in ES6, which is indeed a kludge on top of prototypes.

I wouldn’t say that it’s a kludge. I’d anything it’s more of a realisation of the original vision of JavaScript (which you could fairly call a kludge): using a prototype system to underlie a langage approaching java semantics.

Which may well be the dumbest way to approach it as you get the flexibility of a class-based system and the performances of a prototype-based system rather than the other way around, but at the same time JS’s prototype system was kneecapped from the start.



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

Search: