On Sep 15, 2011, at 10:21 AM, Sean Eagan wrote: > Would a WeakPair primitive be useful... > > let wp = new WeakPair(key, value); > ... > if(wp.hasKey(key)) { > foo(wp.value()); > } > > WeakMap could be built on top of this primitive:
It's not that easy. Read http://www.arnetminer.org/dev.do?m=downloadpdf&url=http://arnetminer.org/pdf/PDFFiles/--g---g-Index1247931776950/Ephemerons A New Finalization Mechanism1247944577286.pdf You need Ephemeron pairs to build such abstractions
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss