On 4/19/14, 4:38 PM, Charles Kendrick wrote:
However, for the record, I continue to think that special treatment of
numeric keys is a really bad design for property order for Objects (for
Arrays, it's fine).
In practice people use plain objects as arrays (i.e. setting indexed
properties on
On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
I'm in the middle of updating the spec. of [[OwnPropertyKeys]] to returns an
Array rather than an Iterator. While doing this I realized that because
[[OwnPropertyKeys]] is essentially a new MOP level operation we have the
On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote:
On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
The ordering I propose is:
1) All array index property keys, in ascending array index numeric order.
Followed by:
2) All other string property keys, in property
On 22 April 2014 16:52, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote:
On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
The ordering I propose is:
1) All array index property keys, in ascending array index numeric
On Apr 22, 2014, at 8:45 AM, Andreas Rossberg wrote:
On 22 April 2014 16:52, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote:
On 19 April 2014 20:14, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
The ordering I propose is:
1) All
Hi,
There has been request to add `Object.getOwnPropertyDescriptors` (plural) to
the standard. Reviewing use cases presented in thread [1] or in older thread
[2], it seems to me that all of them boil down to copy all own properties of
one object to another, e.g.,
while I think that
Object.create(
Object.getPrototypeOf(originalObject),
Object.getOwnPropertyDescriptors(originalObject))
looks semantically better than
Object.mixin(
Object.create(Object.getPrototypeOf(originalObject)),
originalObject)
I also think that Object.mixin could be used for
I would prefer that this implementation limit be treated even more like the
stack limit; say by throwing an error rather than silently adding a 1+2^24
property that breaks the contract. Any reason not to throw an error on this?
That said, I agree that this should be an implementation limit rather
Le 22 avr. 2014 à 19:58, Andrea Giammarchi andrea.giammar...@gmail.com a
écrit :
while I think that
Object.create(
Object.getPrototypeOf(originalObject),
Object.getOwnPropertyDescriptors(originalObject)
)
looks semantically better than
Object.mixin(
IMO every time you use `getOwnPropertyDescriptor` over a
`getOwnPropertyNames` you are asking for a `getOwnPropertyDescriptors`
implementation, that's the use case.
Twisting your question, do you have any use case for `getOwnPropertyNames`
that won't require later on `getOwnPropertyDescriptor` ?
Le 22 avr. 2014 à 21:05, Andrea Giammarchi andrea.giammar...@gmail.com a
écrit :
IMO every time you use `getOwnPropertyDescriptor` over a
`getOwnPropertyNames` you are asking for a `getOwnPropertyDescriptors`
implementation, that's the use case.
And in these cases, again, are the
`getOwnPropertyDescriptors` retrieves at once everything that both `
getOwnProperty{Names,Symbol}` plus `getOwnPropertyDescriptor` per each name
or symbol would .. we have few shortcut/utilities in ES, why you see this
so useless? Even Array#forEach can be decomposed in a for loop ... how
about
On Tue, Apr 22, 2014 at 1:27 PM, Claude Pache claude.pa...@gmail.comwrote:
Hi,
There has been request to add `Object.getOwnPropertyDescriptors` (plural)
to the standard. Reviewing use cases presented in thread [1] or in older
thread [2], it seems to me that all of them boil down to copy all
13 matches
Mail list logo