On 28 September 2011 09:22, Lasse Reichstein <reichsteinatw...@gmail.com> wrote:
>

>
> My point is that while everything is an object, not all objects are equal.
> Objects have meaning. The meaning of the Human object is to represent the
> common things of all humans. The meaning of the Man object is to represent
> the common things of all men. The meaning of the john object is to represent
> a single man.
> If some code expects an object representing a single man (and such code will
> exist) it would be a category error to pass it the Man object.
> This is really class-based thinking: Classes represent groups of things,
> instances represent single things. And this is how your code is structured -
> class based, just without any syntactic help in distinguishing "class
> objects" from "instance objects".
> If you are writing class based structures, you might as well take advantage
> of the built-in support for that. It makes your code much more readable, and
> it also happens to be faster.

I guess what I was trying to say was that if you're using
Object.create you shouldn't be thinking in classes - my thinking is
that Object.create is designed for pure prototypal inheritance, where
you throw away the concept of classes.
-- 
Nick Morgan
http://skilldrick.co.uk
@skilldrick

Save our in-boxes! http://emailcharter.org

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to