A WeakMap where values (not keys) are weak references?

Guy Bedford guybedford at gmail.com
Thu Mar 23 05:29:53 UTC 2017


I hope it wouldn't be too redundant to ask here again if there's been any
movement on the WeakRefs proposal? WebAssembly at 1.0 does seem to bring
new needs for this.
On Tue, 21 Mar 2017 at 18:04, Mark S. Miller <erights at google.com> wrote:

> What you are asking for is sometimes called a "WeakValueMap". It is a very
> sensible abstraction and sometimes exactly what is needed. It is easy to
> build using Maps (or WeakMaps, depending) combined with <
> https://github.com/tc39/proposal-weakrefs>.
>
> The old wiki.ecmascript.org shows an implementation of a WeakValueMap in
> terms of these. Unfortunately the wiki still seems to be offline.
>
> Since there are still outstanding links into it, how did the wiki get
> collected? Were these links weak? ;)
>
>
>
>
>
>
> On Tue, Mar 21, 2017 at 7:20 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>
> On 3/21/17 2:15 AM, /#!/JoePea wrote:
>
> I'd like to have something like a WeakMap where the keys can be
> primitives and the values are weakly-held Objects
>
>
> It might be worth searching the archives: this has been proposed multiple
> times and discussed at quite some length.
>
> If there isn't an existing document that summarizes the discussions (and
> quick searching doesn't find one in the top several hits, though it does
> find https://esdiscuss.org/topic/what-is-the-status-of-weak-references at
> the very least), there really should be one...
>
> -Boris
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
>
> --
>     Cheers,
>     --MarkM
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170323/a7097226/attachment.html>


More information about the es-discuss mailing list