extracting namespace from a property

Francis Cheng fcheng at adobe.com
Thu Mar 1 13:01:35 PST 2007


You may have gotten that impression from the old Netscape ES4 spec,
circa 2003, which agrees with the scenario you describe.

We have not yet posted this to the wiki, but AFAIK, the current thinking
is to have dynamic *not* inherited. This is the way ActionScript 3.0
implemented dynamic classes, i.e. the dynamic attribute is not
inherited. Maybe someone else can chime in with the rationale as I don't
remember (or I never knew).

Francis

-----Original Message-----
From: es4-discuss-admin at mozilla.org
[mailto:es4-discuss-admin at mozilla.org] On Behalf Of Peter Hall
Sent: Thursday, March 01, 2007 12:44 PM
To: Yuh-Ruey Chen
Cc: Brendan Eich; es4-discuss at mozilla.org
Subject: Re: extracting namespace from a property

> > IIRC you are allowed to have a dynamic subclass of a non-dynamic
> > superclass (Jeff correct me if I'm wrong). dynamic is not inherited,
> > and applied to a class, it affects only mutability of instances
> > (whether one can add "expandos", i.e. whether the class "seals"
> > instances), again if my memory is correct. Others should correct me
> > or add more information as needed.
> >

I can't see it in the spec, but I was under the impression that, in
general, dynamic *is* inherited, but Object is made a special
exception to avoid making every object being dynamic. This is
important because any code that relies on the fact that an object is
dynamic (including the class itself) would break if the object turned
out to be an instance of a subclass that didn't declare itself
dynamic.

Peter
_______________________________________________
Es4-discuss mailing list
Es4-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss




More information about the Es4-discuss mailing list