On defining non-standard exotic objects

Tom Van Cutsem tomvc.be at gmail.com
Tue Jan 15 11:35:38 PST 2013

2013/1/9 David Bruant <bruant.d at gmail.com>

> Le 09/01/2013 20:30, Allen Wirfs-Brock a écrit :
>> That still doesn't mean that such a spec. writer doesn't need to
>> understand the ES object invariants as they shouldn't be writing any
>> specification requirments that violates those invariants.
> What I'm trying to get at is that these spec writers don't need to worry
> about the invariants if they define proxies. The invariants will take care
> of themselves.
> If spec writers define proxies, by design, they won't be able to specify
> requirement that violate these invariants.

Well, it's not that simple. Unfortunately direct proxies only enforce the
invariants using runtime checks, so it's easy to specify something
statically as a Proxy that will still fail at runtime.
Of course testing helps here, but my point is that the Proxy API by itself
does not prevent broken invariants. One still needs a good understanding of
the invariants to define correct exotic objects.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130115/52b7ed76/attachment.html>

More information about the es-discuss mailing list