Tech talk on proxies and traits

Mark S. Miller erights at google.com
Sat May 1 10:28:40 PDT 2010


On Sat, May 1, 2010 at 9:29 AM, Faisal Vali <faisalv at yahoo.com> wrote:
>>
>> From: Tom Van Cutsem <tomvc at google.com>
>> To: es-discuss <es-discuss at mozilla.org>
>> Date: Fri, 30 Apr 2010 15:42:26 -0700
>> Subject: Tech talk on proxies and traits
>> Hi,
>> I recently gave a Google tech talk on my joint work with Mark S. Miller on Harmony proxies and the traits.js library. Below is an abstract and a link to the video.
>
> <snip>
>> Video: http://www.youtube.com/watch?v=A1R8KGKkDjU
>> Talk slides: http://es-lab.googlecode.com/files/harmony_highlights_techtalk.pdf
>> traits.js library: www.traitsjs.org
>
> <snip>
>
> Thanks Tom.  I've felt the need for a robust interception mechanism in
> javascript for years now and was disheartened when I read about
> interceptors "climbing the meta ladder" in a possibly prohibitive way.
>  Now, as a result of all your hard work I think we'll be getting quite
> a comprehensive interceptor solution that compromises little. You have
> my gratitude.
>
> Also, thanks for the excellent talk - it is a clear, simple and well
> illustrated introduction to Proxies and Traits.
>
> I do have one request for clarification regarding the object 'proto'
> supplied during proxy creation:
> (i.e. Proxy.create(handler, proto))
>
> Before a proxy has been fixed, the 'proto' is invisible to all
> accesses and mutations on proxy (i.e they are all delegated to the
> handler). Correct?
>
> So It seems to me that the 'proto' object serves only two purposes -
>  1) 'proto' is returned when one calls 'Object.getPrototypeOf(proxy)'
>  2) When a proxy gets 'fixed', the 'proto' object is made the
> 'fixed-proxys's prototype - and all subsequent accesses not explicitly
> handled by the 'fixed-proxy' will be forwarded to the 'proto'
>
> Correct?

Hi Failsal,

Yes, these two. And one more thing I can think of:

3) proxy instanceof Foo
uses proxy's proto to determine if proxy is an instance of Foo.



> Thanks again!
>
> Faisal Vali
> Radiation Oncology
> Loyola
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>



-- 
    Cheers,
    --MarkM


More information about the es-discuss mailing list