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
Object.getOwnPropertyNames return?

On Tue, Sep 6, 2011 at 8:00 AM, David Bruant <david.bru...@labri.fr> wrote:

> Hi,
>
> 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 )
>

PLEASE STOP ;)



>
> David
> ______________________________**_________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>



-- 
    Cheers,
    --MarkM
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to