News for hackers. Stuff that matters.
Re:Class Hierarchies? Don't Do That by jdlshore on Sunday March 30, 2014 @03:15PM (#7497463)
JavaScript is a dramatically OO language. It's just not the OO you're used to.

Everything* in JS other than numbers, strings, and booleans are objects. Functions are objects.

See http://www.objectplayground.com for details. (Temporarily down due to server problems, but hopefully back up soon.)

*Not really everything. Not objects: undefined, null, number, string, boolean. Objects: object, array, regexp, function, everything else.

Re:Class Hierarchies? Don't Do That by AnimalMuppet on Monday March 31, 2014 @02:59PM (#7503413)
What definition of OO doesn't include encapsulation?

And encapsulation in JS is fundamentally broken - everything is public.