On Dec 25, 6:51 pm, fernando trasvina <[email protected]> wrote:
> On Dec 25, 2010, at 1:51 PM, Dmitry A. Soshnikov wrote:

> > 1. If you don't need to classify your object(s) (and the whole inheritance 
> > hierarchic in case you nave more than one object in it) -- use unclassified 
> > pattern (e.g. Object.create).
>
>         I would say that this does not depends on your approach rather should 
> be on what you need, do you need to initialize your new object or no?

Of course you can initialize with Object.create() but it is terrible
verbose and slow. Beyond the initialization need, there is the need to
categorize the different classes of objects. I would argue that once
you begin copying objects, you are already mentally picturing
instances of a particular type. Might as well do it properly so that
this relationship is explicit in your code and enforceable by
consumers.

-- 
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