> > 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 function(){}).constructor
> function () {
> }
> js> function C(){}
> js> new C().constructor
> function C() {
> }
Ah, my mistake there, was thinking of (function(){}).constructor for a
moment there.
> in no case is the value of (new function(){}).constructor Function.
Thinking about it with the new keyword in mind, I just realise that
what Garrett suggested makes no sense anyway - the function object is
the constructor. The function object is an instance of Function, but
the resulting object is an instance of the function object. Making the
object have Function as it's constructor property breaks the
prototype-constructor relationship.
> > On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> >> It appears that es4 ref impl has the correct result for instancof
> >> on primitives
> On Sep 23, 2007, at 8:59 AM, liorean wrote:
> > A bugfix, IIRC.
On 23/09/2007, Brendan Eich <[EMAIL PROTECTED]> wrote:
> Incompatbile enough that we are not taking the chance -- we are
> changing this to match ES1-3, and to avoid boolean <: Boolean etc.
Sad to hear that, but I guess compatibility will have to rule here.
--
David "liorean" Andersson
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss