getter and setter inheritance
liorean
liorean at gmail.com
Fri May 9 09:33:56 PDT 2008
2008/5/9 Lars Hansen <lhansen at adobe.com>:
> My view is that getters and setters introduce properties and that whatever we do should be appropriate to that model.
That is pretty much my view as well. Just a couple of questions that
might need addressing, if it hasn't been dealt with already:
- Can you have a property together with a getter and/or a setter?
- If so:
* Is there any way to reach that property from inside the
getter/setter without ending up recurring into the getter/setter?
* Can a setter modify the property if there is a property but no getter?
* Can a getter read the property if there is a property but no setter?
> Others seem to think that getters and setters introduce a way of invoking
> normal methods by a different syntax and that they are truly just methods.
> In the world of classes and instances that may be appropriate, but not in
> the object-and-property world of ES3, I expect.
Or one could consider an ES3 property as a getter/setter pair, if one wished.
--
David "liorean" Andersson
More information about the Es4-discuss
mailing list