Non-generic traps for non-generic objects (was: Overriding Map/etc with get/set hooks?)

Jason Orendorff jason.orendorff at gmail.com
Tue May 28 11:00:01 PDT 2013


On Fri, May 24, 2013 at 8:28 PM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:

> On Fri, May 24, 2013 at 4:14 PM, Jason Orendorff
> <jason.orendorff at gmail.com> wrote:
> > It seems rather heavyweight. You can already get about the same effect
> just
> > by writing that wrapper yourself.
>
> As I've argued and demonstrated in these threads already, no, you
> can't just do it yourself.  Every solution fails in at least some
> details, usually trading security against convenience or the other way
> around.


Other axes include simplicity and performance, and there are tradeoffs with
every proposed design. That’s how things are.

This isn't acceptable, given that I can produce a *perfect*
> "object map" with existing Proxy operations.
>

Having one kind of hook does not imply that some other completely different
kind of hook must be added. Software design is chock full of this kind of
design tradeoff.

These assertions that a particular use case (your use case) must be
addressed, in the particular way you've proposed, and that anything less is
unacceptable—they are unconvincing, to say the least.

I still think WebIDL might be the way to go. After all it is WebIDL support
that makes your current spec language possible. But I have one more
possibly productive suggestion, which I'll try to post today.

-j
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130528/29d0d86b/attachment-0001.html>


More information about the es-discuss mailing list