Proposal About Private Symbol

Domenic Denicola d at domenic.me
Sun Dec 21 17:01:49 PST 2014


That breaks membranes.
________________________________
From: Gary Guo<mailto:nbdd0121 at hotmail.com>
Sent: ‎2014-‎12-‎21 20:00
To: Domenic Denicola<mailto:d at domenic.me>
Cc: es-discuss at mozilla.org<mailto:es-discuss at mozilla.org>
Subject: RE: Proposal About Private Symbol

I didn't quite get the point when private symbols pass through the proxy. What will cause the problem in such a situation? How about the proxy get/set the target without passing through handler?

For example
```js
var psym=Symbol('private', true);
var obj={};
var proxy=new Proxy(obj, {
    get:function(){console.log('Capture');},
    set:function(){console.log('Capture');}
);
proxy[psym] // without triggering get handler
proxy[psym]='sth' // without triggering set handler
```
Just simply doesn't grant the proxy the right to operate on private symbols


> From: d at domenic.me
> To: waldron.rick at gmail.com; nbdd0121 at hotmail.com; es-discuss at mozilla.org
> Subject: RE: Proposal About Private Symbol
> Date: Sat, 20 Dec 2014 20:11:04 +0000
>
> For more reasons on why a simple "private symbol" approach does not quite work, see https://github.com/zenparsing/es-abstract-refs/issues/11#issuecomment-65723350
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141222/e3f9efc4/attachment-0001.html>


More information about the es-discuss mailing list