Skip to content

Comment on Introduction to Object-Oriented JavaScript - MDC Docsparent

Comments

Please don't make us start saying "object used as a class".

The first step to learning JavaScript is to forget about class-ical OOP, you can't write good code if you start forcing class-ical concepts on JavaScript, it's a prototypical language encouraging people to treat it as something else is wrong.

When a language has a deficiency people make up for it with libraries. If you don't acknowledge the "class pattern" for object inheritance then you are dismissing an incredibly popular use of OO.

Whether or not code reuse via OO is a good thing or not is a whole other debate though. I don't try to warp every problem into a class hierarchy, but sometimes it's a useful conceptual tool.

AboutSource Built by g1lg1l

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