Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-11 Thread Andrea Giammarchi
just for record sake, I've re-explained what's the issue here in a node.js related thread: https://github.com/joyent/node/issues/7587#issuecomment-42796524 Best Regards On Fri, May 9, 2014 at 6:58 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: also, on top of this ... I'd like to

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-09 Thread Allen Wirfs-Brock
On May 8, 2014, at 9:08 PM, Mathias Bynens wrote: On Fri, May 9, 2014 at 1:44 AM, John-David Dalton john.david.dal...@gmail.com wrote: Should I create a spec bug for tracking this? Please do. Even better, submit a strawman proposal allen ___

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-09 Thread John-David Dalton
Rock, will do. Thanks! - JDD ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-09 Thread Andrea Giammarchi
just wrote this down ... it takes an eye blink to agree with and adopt even in ES6, IMHO https://gist.github.com/WebReflection/48aecb771e61e8a3e168 On Fri, May 9, 2014 at 11:08 AM, John-David Dalton john.david.dal...@gmail.com wrote: Rock, will do. Thanks! - JDD

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-09 Thread Andrea Giammarchi
also, on top of this ... I'd like to add the fact that es5-sham, the drop in everyone thinks is cool to use to support old browsers not compatible with ES5, is entirely based on own properties since ever: https://github.com/es-shims/es5-shim/blob/master/es5-sham.js#L310 the owns definition in

ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread John-David Dalton
ES6 additions like Object.assign use [[OwnPropertyKeys]] for getting the keys of `source` objects. This helps avoid the method gotchas faced by developers previously with things like `Object.prototype.writable = true` and `Object.defineProperty(o, 'foo', { value: 'bar' })`. See

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Mameri, Fred (HBO)
john.david.dal...@gmail.commailto:john.david.dal...@gmail.com Date: Thursday, May 8, 2014 at 1:25 PM To: es-discuss Steen es-discuss@mozilla.orgmailto:es-discuss@mozilla.org Subject: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]] ES6 additions like Object.assign use [[OwnPropertyKeys

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread John-David Dalton
I agree with you that this would be a much better design, but it would break backwards compatibility with ES5, no? There have been other changes to the spec that are technically back-compat breaking like Object.keys('x') no longer throwing an error. I think this change would benefit developers

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Andrea Giammarchi
that does not save you from errors when `Object.prototype.get = function(){}` since `writable` and `get/set` cannot coexist in a descriptor ... a safe approach is to create `var descriptor = Object.create(null);` and then set its `value` later on before assignment. I remember early discussion

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Andrea Giammarchi
iw=say ... is way On Thu, May 8, 2014 at 2:38 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: that does not save you from errors when `Object.prototype.get = function(){}` since `writable` and `get/set` cannot coexist in a descriptor ... a safe approach is to create `var descriptor

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Andrea Giammarchi
OK, hasOwnProperty per descriptor would work too ... probably even easier as spec change than having all null objects +1 to that On Thu, May 8, 2014 at 2:35 PM, John-David Dalton john.david.dal...@gmail.com wrote: I agree with you that this would be a much better design, but it would break

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Allen Wirfs-Brock
On May 8, 2014, at 1:25 PM, John-David Dalton wrote: ES6 additions like Object.assign use [[OwnPropertyKeys]] for getting the keys of `source` objects. This helps avoid the method gotchas faced by developers previously with things like `Object.prototype.writable = true` and

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread John-David Dalton
Thanks for the discussion links, Allen. I'm I reading it right that there was no concrete resolution to the issue? - JDD ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Allen Wirfs-Brock
On May 8, 2014, at 4:05 PM, John-David Dalton wrote: Thanks for the discussion links, Allen. I'm I reading it right that there was no concrete resolution to the issue? Right, nothing concrete came out of it so won't happen for ES6. Post-ES6 is always possible. Allen

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread John-David Dalton
Is Post-ES6 up for discussion? Should I create a spec bug for tracking this? - JDD ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ToPropertyDescriptor, [[HasProperty]], [[HasOwnProperty]]

2014-05-08 Thread Mathias Bynens
On Fri, May 9, 2014 at 1:44 AM, John-David Dalton john.david.dal...@gmail.com wrote: Should I create a spec bug for tracking this? Please do. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss