Proposal About Private Symbol

Gary Guo nbdd0121 at hotmail.com
Sun Dec 21 16:58:51 PST 2014




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```jsvar 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 handlerproxy[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/a03c48fe/attachment.html>


More information about the es-discuss mailing list