But why is hasOwnProperty application and getOwnPropertyNames meta?
Both naming (keys vs. GetOwnPropertyNames) and layering seems somewhat
arbitrary and may be as much influenced by whose method they were
inspired by (e.g. Prototype.js) and which participant was driving a
particular decision than anything else. End result feels somewhat
Balkanized

On Feb 28, 11:29 pm, Juriy Zaytsev <[email protected]> wrote:
> One of the main reasons was separation of meta and application layers.
>
> Take a look at this doc for a thorough explanation of rationale behind new 
> API.
>
> http://wiki.ecmascript.org/lib/exe/fetch.php?id=es3.1%3Aes3.1_proposa...
>
> --
> kangax
>
> Sent from my iPhone
>
> On Feb 28, 2011, at 9:56 PM, Jason Persampieri <[email protected]> wrote:
>
>
>
> > Just read Angus Croll's post on the new Object properties, 'keys' and 
> > 'getOwnPropertyNames'.  
>
> >http://javascriptweblog.wordpress.com/2011/02/28/javascript-object-ke...
>
> > It got me thinking... I hadn't noticed until now, but it looks like all of 
> > the new properties (create/preventExtensions/etc) are implemented on 
> > Object, as opposed to Object.prototype.  Any insight as to why?  It may be 
> > just a personal preference, but I would *vastly* prefer obj.keys() over 
> > Object.keys(obj).
>
> > _jason
> > --
> > 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]

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