getter and setter inheritance

P T Withington ptw at
Mon May 12 07:58:42 PDT 2008

On 2008-05-09, at 12:46 EDT, Lars Hansen wrote:

> (One bike ride and one cup of coffee later.)
> Clearly there is a difference between class/interface inheritance on  
> the
> one hand and prototype inheritance on the other.
> In either case I think the introduction of a setter and/or a getter  
> in a
> context introduces definitions for both in that context, essentially a
> special property that holds a getter/setter pair.  A missing
> getter/setter is generated (that's what ES4 specifies now.)  That  
> means
> that in prototype contexts, if an object has a getter or a setter  
> for a
> field, the prototype will never be searched for the missing half.   
> In a
> class context, getters and setters can be overridden because the class
> instance only has the one special property with the getter/setter  
> pair,
> and the values in that property depend on the class that the  
> instance is
> an instance of.  So different classes have different pairs.

(I've only been to spin class, but I've had 1 coffee and 2 teas.)

When "A missing getter/setter is generated", what is its  
functionality?  Does it just error?

Can I call a super getter/setter method (I hope)?  What is the syntax  
for that?

More information about the Es4-discuss mailing list