2008/7/18 Allen Wirfs-Brock <[EMAIL PROTECTED]>:
> Collectively, 
> getOwnProperty,defineProperties/defineProperty,getOwnPropertyNames,getPrototypeOf
>  are intended to provide all the mechanisms necessary to build any of these 
> variants to extent or any other model of property manipulation using whatever 
> policies for property selection that might be desired by the designer.

This suggests to have a convenience method like getOwnProperties that
return an array of ptoperty descriptor for the object. It would allow
a user to define a simple form of the extend method as:

  Object.defineProperties(destination, Object.getOwnProperties(source));

It would also allow to define Object.clone(source) precisely as

  Object.create(Object.getPrototypeOf(source), Object.getOwnProperties(source));

Which in fact shows that Object.clone is in the same category as
Object.extend. Both methods defines very particular arrangement of
properties in the object and less fundamental than the rest sets of
the methods.

Regards, Igor
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to