On Fri, May 27, 2011 at 1:05 PM, Sean Eagan <seaneag...@gmail.com> wrote:
> On Fri, May 27, 2011 at 12:43 PM, Sean Eagan <seaneag...@gmail.com> wrote:
>> Of course you could go the other way, and remove the default trap
>> implementations.  All objects could have the same internal method
>> implementation regardless of whether or not they are a proxy.  Within
>> each internal method there could be a check as to whether the object
>> is a proxy (has a [[Handler]]) AND has the trap, if so, it is invoked,
>> otherwise the default pseudocode is performed.
>
> The pseudocode for checking if the object has a [[Handler]], and if
> that [[Handler]] has a trap, and then invoking the trap could all be
> factored out into a [[Trap]] (or something) internal method, which
> takes a trap name, and a list of arguments to pass to the trap, and
> returns whether or not the object has the trap, and if so, also a
> return value from the trap.  This would make for a very concise and
> clear spec with regard to proxies, and it would be relatively easy to
> update the current proposal to do this.
>

For expository purposes it might still be useful to have actual ES
versions of the default pseudocode sections of the internal methods
somewhere.  This could either be via a non-normative addendum to the
spec, or left up to the community to provide outside the spec.  The
latter option might be better since it could be updated independent of
the spec in case of any bugs found.

Thanks,
Sean Eagan
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to