Re: "not a Date object" vs. "not an object with [[Class]] of ''Date''"

2010-10-03 Thread Jorge
On 02/10/2010, at 22:51, Brendan Eich wrote: > On Oct 2, 2010, at 6:49 AM, Jorge wrote: >> >> >> Why not simply spec an Array.create() ? >> >> -no need to redefine what an array is. > > It's not clear from kangax's blog post that an array with an extra object on > its prototype chain before Ar

Re: "not a Date object" vs. "not an object with [[Class]] of ''Date''"

2010-10-03 Thread Andrea Giammarchi
I don't know man, I kinda like the possibility, but I am pretty sure we gonna end up trying to figure out via weird tricks if an Array is a native one or not (e.g. Array.isReallyAnArray(obj)) ... however, it's good to have more power than less ;-) Regards, Andrea Giammarchi On Sun, Oct 3, 201

Re: "not a Date object" vs. "not an object with [[Class]] of ''Date''"

2010-10-03 Thread Dmitry A. Soshnikov
And one more thing to note, is that "Array.create" in general (if not to say -- /only/) is for the case of having objects which [[Class]] is "Array". It's very inconvenient (because of default property values of the descriptor) to define an array's elements with this function (I've updated the

Re: "not a Date object" vs. "not an object with [[Class]] of ''Date''"

2010-10-03 Thread Dmitry A. Soshnikov
On 03.10.2010 1:56, Andrea Giammarchi wrote: this.push.apply(this, [1, 2, 3]); ... , Dmitry, WTF :D this.push(1, 2, 3); easy :P Ah, it was copy-pasted from more generic case when data came from arguments. I still don't like the idea of "injectable [[Class]]" for user defined objects