Finiteness of object properties set

David Bruant david.bruant at
Tue Sep 6 08:00:30 PDT 2011


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 says:
"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 non-existent).

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 )


More information about the es-discuss mailing list