Weak event listener

Brendan Eich brendan at mozilla.com
Tue Mar 26 13:05:18 PDT 2013


Hi Jason, agree on your request for non-contrived use-cases. I wrote 
about the general observer pub/sub problem here:

http://www.mail-archive.com/es-discuss@mozilla.org/msg21480.html

Hope it helps. One specific thought below.

Jason Orendorff wrote:
> What would work here is determinism:
>      https://gist.github.com/jorendorff/5245857
> For this, a deterministic API is just as easy to use, easier to
> implement, and easier to reason about.

It seems to me you want some kind of deterministic finalization or 
scoped destructor. That's not in the cards for JS.

/be


More information about the es-discuss mailing list