Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, Brendan Eich <[EMAIL PROTECTED]> wrote: > On Sep 23, 2007, at 12:22 PM, Garrett Smith wrote: > > >>> in no case is the value of (new function(){}).constructor Function. > >> > > It shouldn't be, but it is in OSX Ref Impl. (I did not build this). > > > > js> (new function(){}).constructo

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Brendan Eich
On Sep 23, 2007, at 12:22 PM, Garrett Smith wrote: >>> in no case is the value of (new function(){}).constructor Function. >> > It shouldn't be, but it is in OSX Ref Impl. (I did not build this). > > js> (new function(){}).constructor > [function Function] No, that's just http://bugs.ecmascript.o

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, liorean <[EMAIL PROTECTED]> wrote: > On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > > Function objects get a non-enumerable constructor. > > function F(){}; > > F.constructor === Function; // true > > F.prototype.hasOwnProperty('constructor'); //true > > F.prototype.propertyI

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread liorean
On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > Function objects get a non-enumerable constructor. > function F(){}; > F.constructor === Function; // true > F.prototype.hasOwnProperty('constructor'); //true > F.prototype.propertyIsEnumerable("constructor"); // false. Of course. > Object

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, liorean <[EMAIL PROTECTED]> wrote: > > > On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > > >> 2. (new function(){}).constructor should be Function. > > > On Sep 23, 2007, at 8:59 AM, liorean wrote: > > > I agree. And in ES3 it is, unless the function either: > > On 23/09/2007,

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread liorean
> > On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > >> 2. (new function(){}).constructor should be Function. > On Sep 23, 2007, at 8:59 AM, liorean wrote: > > I agree. And in ES3 it is, unless the function either: On 23/09/2007, Brendan Eich <[EMAIL PROTECTED]> wrote: > No: > > js> (new

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/23/07, liorean <[EMAIL PROTECTED]> wrote: > > > On 22/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > > > > What I've found is that it's always giving wrong constructor property > > > > with inheritance chains. > > > > > > > > A <-- B <-- C > > > > c = (new C).constructor;// A > > > > > >

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Brendan Eich
On Sep 23, 2007, at 8:59 AM, liorean wrote: >> 1. The constructor property should be on the object instance >> *created* >> by the function. > > That argument I agree with. It should be on the instance and not > the prototype. The reason for the original prototype-owned constructor was to aff

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread liorean
> > On 22/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > > > What I've found is that it's always giving wrong constructor property > > > with inheritance chains. > > > > > > A <-- B <-- C > > > c = (new C).constructor;// A > > > > > I meant an enumerable superclass property! > On 9/22/07, li

Re: 13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)

2007-09-23 Thread Garrett Smith
On 9/22/07, liorean <[EMAIL PROTECTED]> wrote: > On 22/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote: > > What I've found is that it's always giving wrong constructor property > > with inheritance chains. > > > > A <-- B <-- C > > c = (new C).constructor;// A > > I meant an enumerable supercla