2013/7/31 Allen Wirfs-Brock al...@wirfs-brock.com
We could define a new predicate Array.isArrayLike with a proxy friendly
extensions mechanism (@@isArrayLike). It wouldn't be the same test as
Array.isArray and the result would be more a statement of intent than an
absolute guarantee.
On Jul 31, 2013 6:40 AM, Tom Van Cutsem tomvc...@gmail.com wrote:
On the flip side: DOM nodelists, while behaviorally similar to arrays,
also don't pass the Array.isArray test. Does this anger developers? Or is
this common wisdom and people have learned to live with the differences
between
On Jul 29, 2013, at 7:04 PM, David Bruant wrote:
Le 30/07/2013 03:09, Allen Wirfs-Brock a écrit :
On Jul 29, 2013, at 5:11 PM, David Bruant wrote:
Le 29/07/2013 20:41, Allen Wirfs-Brock a écrit :
The legacy [[Class]] internal property conflated these two concepts.
Sometimes it was used
2013/7/30 Allen Wirfs-Brock al...@wirfs-brock.com
On Jul 29, 2013, at 7:04 PM, David Bruant wrote:
Le 30/07/2013 03:09, Allen Wirfs-Brock a écrit :
On Jul 29, 2013, at 5:11 PM, David Bruant wrote:
Nope. We would have had the same problems if we had kept [[Class]]. In
ES=5.1 [[Class]] is
tl;dr:
I would argue that Array.isArray should return true for proxies-for-arrays.
The other built-ins are less crucial and could stay the way they are.
Summarizing the previous discussion:
- I agree that it is not safe to generalize: a proxy for an X is not in
general substitutable for X.
- It
/ * ArrayBuffer.isView
// yup. The use cases for isView aren't all that clear to me. It could be
// expressed a @@isView test if it has important use cases.
/
I'm not familiar enough with ArrayBuffers to understand the consequences.
By analogy with Array.isArray, if a proxy-for-arraybuffer
2013/7/30 Tom Van Cutsem tomvc...@gmail.com
tl;dr:
I would argue that Array.isArray should return true for proxies-for-arrays.
The other built-ins are less crucial and could stay the way they are.
What about WeakMaps? Maps? Sets?
How is the line drawn between crucial and less crucial? How is
2013/7/30 David Bruant bruan...@gmail.com
2013/7/30 Tom Van Cutsem tomvc...@gmail.com
tl;dr:
I would argue that Array.isArray should return true for
proxies-for-arrays.
The other built-ins are less crucial and could stay the way they are.
What about WeakMaps? Maps? Sets?
I meant the
On Jul 30, 2013, at 1:25 AM, David Bruant wrote:
2013/7/30 Allen Wirfs-Brock al...@wirfs-brock.com
On Jul 29, 2013, at 7:04 PM, David Bruant wrote:
Le 30/07/2013 03:09, Allen Wirfs-Brock a écrit :
On Jul 29, 2013, at 5:11 PM, David Bruant wrote:
...
no special this here. I'm just
Le 30/07/2013 18:57, Allen Wirfs-Brock a écrit :
So far in ES=6 dealing with such private data slots is something that
could be treated in a relatively ad hoc manner within the ES spec. and
by implementations. But in ES7 we really want and need user definable
per instance private data. The
On Jul 30, 2013, at 12:40 PM, David Bruant wrote:
Le 30/07/2013 18:57, Allen Wirfs-Brock a écrit :
...
But it still doesn't work the way you would like for direct call
invocation or for things like Array.isArray. The base issue for either of
these is that they don't indirect through
On Tue, Jul 30, 2013 at 10:19 PM, Allen Wirfs-Brock
al...@wirfs-brock.comwrote:
I was really asking about purpose of application level Array.isArray
tests. What is the application really asking when it uses that test? Is it
really asking array-like? What counts as array-like?
My guess is:
On Jul 30, 2013, at 2:21 PM, Till Schneidereit wrote:
On Tue, Jul 30, 2013 at 10:19 PM, Allen Wirfs-Brock al...@wirfs-brock.com
wrote:
I was really asking about purpose of application level Array.isArray tests.
What is the application really asking when it uses that test? Is it really
Le 30/07/2013 22:19, Allen Wirfs-Brock a écrit :
On Jul 30, 2013, at 12:40 PM, David Bruant wrote:
Le 30/07/2013 18:57, Allen Wirfs-Brock a écrit :
...
But it still doesn't work the way you would like for direct call
invocation or for things like Array.isArray. The base issue for
either
On Wed, Jul 31, 2013 at 12:19 AM, Allen Wirfs-Brock
al...@wirfs-brock.comwrote:
On Jul 30, 2013, at 2:21 PM, Till Schneidereit wrote:
On Tue, Jul 30, 2013 at 10:19 PM, Allen Wirfs-Brock al...@wirfs-brock.com
wrote:
I was really asking about purpose of application level Array.isArray
Hi,
Originally, direct proxies were specified such that a direct proxy would
inherit the [[Class]] of the target object it wraps. The intent was for
e.g. proxies-for-arrays to be recognized properly as arrays.
In ES6 the [[Class]] property is gone and the current draft instead uses
wording such
On Jul 29, 2013, at 9:06 AM, Tom Van Cutsem wrote:
Hi,
Originally, direct proxies were specified such that a direct proxy would
inherit the [[Class]] of the target object it wraps. The intent was for e.g.
proxies-for-arrays to be recognized properly as arrays.
In ES6 the [[Class]]
Le 29/07/2013 20:41, Allen Wirfs-Brock a écrit :
The legacy [[Class]] internal property conflated these two concepts. Sometimes
it was used for to ensure that a built-in method was operating upon an instance
that actually had the internal state or conformed to other implementation level
David Bruant wrote:
Also, I fail to understand the difference between if O is an exotic X
object and if O.[[Class]] === X.
+1
What have we gained?
/be
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On 7/29/2013 5:14 PM, Brendan Eich wrote:
David Bruant wrote:
Also, I fail to understand the difference between if O is an exotic
X object and if O.[[Class]] === X.
+1
What have we gained?
It seems to me like duck-typing based on internal properties was
basically superseded by @@create
On Jul 29, 2013, at 5:11 PM, David Bruant wrote:
Le 29/07/2013 20:41, Allen Wirfs-Brock a écrit :
The legacy [[Class]] internal property conflated these two concepts.
Sometimes it was used for to ensure that a built-in method was operating
upon an instance that actually had the internal
Le 30/07/2013 03:09, Allen Wirfs-Brock a écrit :
On Jul 29, 2013, at 5:11 PM, David Bruant wrote:
Le 29/07/2013 20:41, Allen Wirfs-Brock a écrit :
The legacy [[Class]] internal property conflated these two concepts. Sometimes
it was used for to ensure that a built-in method was operating
22 matches
Mail list logo