On Thu, Nov 13, 2014 at 7:42 PM, Anne van Kesteren ann...@annevk.nl wrote:
http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Sep/thread.html#msg24
It seems in scope for the specification that defines window.onerror...
Someone is working on standardizing parts of the console API
As quick parenthesis, I do hope the potentially evil code I've written will
be possible in the future, as universal solution to `undefined is not
defined` error in development code.
evil is never necessarily evil, going with prohibitionism won't make
anyone happy.
About `Array.isArray` though, I
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Tom Van
Cutsem
Is the `length` invariant really the dominant meaning JS developers attribute
to Array.isArray? I think to most developers Array.isArray(obj) returning
true means that it's safe to call the array utilities
Hai.
Why not Symbol.isArray?
To me the most interesting question is how to create objects that get
JSON-stringified as [], not {}. Some sort of symbol-based mechanism makes
sense for that, IMO...
toJSON method.
`JSON.stringify({toJSON: () = [2,3,4,5]})`
This is really interesting. It does argue for some kind of redefinition of
Array.isArray to return is this an instance of some %ArrayPrototype% in
some realm?
Yeah, my guess would be that if (Array.isArray(obj) === true), then the
user will infer that one or both of the following is true:
-
On Nov 13, 2014, at 5:02 PM, Brendan Eich wrote:
Allen Wirfs-Brock wrote:
We might redefine Array.isArray to be based upon testing for
@@isConcatSpreadable but that potentially would give different results for
legacy uses that did __proto__ hacking such as I mentioned in my previous
On Nov 14, 2014, at 4:53 AM, Domenic Denicola wrote:
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Tom Van
Cutsem
Is the `length` invariant really the dominant meaning JS developers
attribute to Array.isArray? I think to most developers Array.isArray(obj)
On Nov 13, 2014, at 7:53 PM, Cyrus Najmabadi wrote:
Specifically, while the spec says that :
SomeProd[Yield,GeneratorParameter]
Is equivalent to:
1) SomeProd
2) SomeProd_Yield
3) SomeProd_GeneratorParameter
4) SomeProd_Yield_GeneratorParameter
From: Allen Wirfs-Brock [mailto:al...@wirfs-brock.com]
What do you mean by is an instance of some %ArrayPrototype%? Do you mean
that it has some %ArratPrototype% in it's prototype chain?
Yeah, more or less. A realm-independent instanceof. This makes sense also
from the historical
On Nov 14, 2014, at 11:41 AM, Domenic Denicola wrote:
From: Allen Wirfs-Brock [mailto:al...@wirfs-brock.com]
What do you mean by is an instance of some %ArrayPrototype%? Do you mean
that it has some %ArratPrototype% in it's prototype chain?
Yeah, more or less. A realm-independent
2014-11-14 21:00 GMT+01:00 Allen Wirfs-Brock al...@wirfs-brock.com:
On Nov 14, 2014, at 11:41 AM, Domenic Denicola wrote:
Yeah, more or less. A realm-independent instanceof. This makes sense
also from the historical perspective that `Array.isArray` was meant to
provide a cross-realm
Tom Van Cutsem wrote:
No really, it was a way to expose a test of the [[Class]] internal
property. That test wasn't dependent upon the [[Prototype]] chain.
I think what Domenic was saying is that Array.isArray used such a test
*because* instanceof Array didn't work reliably
Perfect.
-- Cyrus
From: Allen Wirfs-Brock [mailto:al...@wirfs-brock.com]
Sent: Friday, November 14, 2014 9:21 AM
To: Cyrus Najmabadi
Cc: Jason Freeman; es-discuss list
Subject: Re: Grammar question about ArrowFormalParameters
On Nov 13, 2014, at 7:53 PM, Cyrus Najmabadi wrote:
2014-11-13 22:35 GMT+01:00 Tom Van Cutsem tomvc...@gmail.com:
My intuition is that Array.isArray is often used to branch based on
whether code received just one versus a collection of values. E.g. a
function may take a single parameter that can be bound to either a single
value or a
I don't have the data to back this up, but I would argue that the developer
community has essentially adopted `Array.isArray()` as a sane replacement
for `Object.prototype.toString.call(maybeArray) === '[object Array]'`.
I realize this forum doesn't have the luxury of *not* considering the
2014-11-14 21:52 GMT+01:00 Jeremy Martin jmar...@gmail.com:
Allen's previous comments:
Proxies are not transparent forwarders! In particular their default
handling of the `this` value on method invokes will break any built-in
method that needs to access internal slots of an object.
Tom Van Cutsem wrote:
2014-11-14 21:52 GMT+01:00 Jeremy Martin jmar...@gmail.com
mailto:jmar...@gmail.com:
Allen's previous comments:
Proxies are not transparent forwarders! In particular their
default handling of the `this` value on method invokes will
break any
(Mostly) transparent forwarding seems to be one of the more compelling and
generally useful characteristics of Proxies. I have to lean heavily on the
deeper knowledge of the group here, but *if* `new Proxy([], {})` otherwise
behaves like a bonafide array when you treat it like one, then it would
18 matches
Mail list logo