WebIDL attribute reflection
brandon at brandonbenvie.com
Sun Dec 30 10:31:29 PST 2012
The problem I see with the accessor model is that it's attempting to use
what's now being referred to in recent ES6 specs as "Ordinary" object
semantics, when the functionality is absolutely of exotic functions. The
internal functions are no longer magical, as in completely outside the
bounds of what's possible in ECMAScript, but they're trying to be
shoehorned to an even lower level: implementation as completely plain
objects. Ordinary objects only have accessors to describe "interesting"
non-data properties. But exotic objects, even limited to ones entirely
specified in ES6, have interesting mechanics that cannot be replicated by
ordinary objects and are better described with those mechanics than trying
to shoehorn them in.
A comparable thing would be attempting to explain Array instance lengths
using a (observable) accessor property with a getter and setter on the
prototype. It would be possible, but it would also introduce the same
problems I outlined in my earlier response that are currently issues in
Firefox and IE.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss