Finiteness of object properties set
Mark S. Miller
erights at google.com
Tue Sep 6 08:59:41 PDT 2011
I agree that the spec should clearly state that a non-extensible object has
a finite collection of own properties. Regarding infinite extensible
objects, the only problem I see off the top of my head is: What would
On Tue, Sep 6, 2011 at 8:00 AM, David Bruant <david.bruant at labri.fr> wrote:
> There is a current expectation of objects being a /finite/ collection of
> properties, but I don't see this information written anywhere. ES5.1 - 4.3.3
> "An object is a collection of properties..."
> "Collection" is nowhere defined in the spec. The Wikipedia page does not
> state clearly anything about collection finiteness.
> I have re-read very carefully the ES5.1 invariants regarding non-extensible
> objects and they do not prevent (host) objects with an infinite set of
> properties. More precisely, calls to [[GetOwnProperty]] on non-extensible
> objects are not forbidden to describe as existent, properties which have not
> been observed as non-existent (which leaves (infinite) room since within in
> a finite time, only a finite set of properties can be observed as
> The current design of the fix trap explicitely asks for an regular object
> (which has a finite set of properties). The same applies to the current
> design of non-extensible proxies which has an internal set of properties
> (finite in current Tom's implementation).
> Should the spec clearly state something about object property finiteness?
> (I have some crazy ideas with the fix trap returning RegExps, there is
> still time to stop me :-p )
PLEASE STOP ;)
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss