> ES2015 already has element accessor overloading with proxies, right? > It's everything else that's missing.
Proxies enforce invariants, which is problematic for this use case because it’s A) expensive, and B) also restricts you from “lying” about the actual properties which exist on the element. I recall from an old presentation on Value Types that overloading `[]` was off limits because those invariants needed to keep working. > On Aug 12, 2015, at 1:44 PM, Daniel Ehrenberg <[email protected]> wrote: > > On Wed, Aug 12, 2015 at 4:50 AM, Caitlin Potter <[email protected]> > wrote: >> Operator overloading or value types might make it look a lot prettier some >> day (though iirc element assessor overloading was off limits), but you could >> get pretty far by baking it into a compile-to-js language. > > ES2015 already has element accessor overloading with proxies, right? > It's everything else that's missing. _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

