Re: Native base64 utility methods

2014-05-08 Thread Mathias Bynens
On 5 May 2014, at 20:22, Andrea Giammarchi andrea.giammar...@gmail.com wrote: @mathias didn't mean to change atob and btoa rather add two extra methods such encode/decode for strings (could land without problems in the String.prototype, IMO) with less silly names whatever definition of silly

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)
I agree with you that this would be a much better design, but it would break backwards compatibility with ES5, no? Minor nitpick: I guess you mean to say that ToPropertyDescriptor should use the abstract operation HasOwnProperty, not [[HasOwnProperty]]... Fred From: John-David Dalton

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-08 Thread Tom Van Cutsem
Allen, Mark and I discussed the [[Origin]] issue and came to the following consensus: We remove [[Origin]] and revert to the originally specified behavior ( http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec) where the descriptor returned by the proxy is coerced into a fresh, normalized,

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: Object.getOwnPropertyDescriptor can return just about anything

2014-05-08 Thread Rick Waldron
On Thu, May 8, 2014 at 5:23 PM, Tom Van Cutsem tomvc...@gmail.com wrote: Allen, Mark and I discussed the [[Origin]] issue and came to the following consensus: We remove [[Origin]] and revert to the originally specified behavior ( http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec)

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