On 27 September 2011 17:25, Lasse Reichstein <[email protected]> wrote:

> Also, when doing pure object-based design, you have to keep your categories
> clear. Your Human and Man objects are clearly prototype objects, not
> instance objects. They are meant to be inherited, not used directly. The
> object you create with Object.create(Man) is an instance object representing
> a single man. There is nothing distinguishing them in the code,
> though. Constructor functions holding prototype objects does that for you.
> /L

I don't understand what you're saying here. You'd only use
Object.create to create instances based on other instances, not on
constructor functions. So you don't need to keep categories clear -
everything is an object, there are no constructor functions. Or am I
missing something?
-- 
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/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to