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

2007-12-14 Thread Brendan Eich
On Dec 14, 2007, at 12:50 PM, P T Withington wrote: On 2007-09-23, at 14:14 EDT, Brendan Eich wrote: The reason for the original prototype-owned constructor was to afford a back-pointer from prototype to constructor function without imposing a per-instance property (which could be optimized

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 snip I meant an enumerable superclass property!

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 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

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: Function objects get a non-enumerable constructor. function F(){}; F.constructor === Function; // true F.prototype.hasOwnProperty('constructor'); //true

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

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(){}).constructor [function