JavaScript WeakMaps are not actually weak: they refer strongly to their contents as long as the key is alive.
This brings the list of imprecisely-named ECMAScript APIs to:
Map → OrderedMap
Set → OrderedSet
Promise.race → Promise.anySettled
WeakMap → Ephemeron
-
-
Replying to @mathias
Bah, they're plenty weak about the key, it's fine.
But jayzus, Ephemeron would have been a terrible name.4 replies 0 retweets 15 likes -
Replying to @tabatkins
IIRC the originally proposed name was in fact EphemeronTable.
1 reply 0 retweets 3 likes
Replying to @mathias @tabatkins
Mathias Bynens Retweeted Allen Wirfs-Brock
Confirmed by @awbjs himself:https://twitter.com/awbjs/status/1146437699324088322 …
Mathias Bynens added,
Allen Wirfs-Brock @awbjs
The original proposal used the name EphemeronTable for what became WeakMap.
My preference was to call it ObjectRegistry as that seems to better reflect the primary use case.
http://wiki.ecmascript.org/doku.php?id=strawman:allen_wirfs-brock_s_comments_on_ephemeron_table_proposal … https://twitter.com/mathias/status/1146429639428100096 …
8:28 AM - 3 Jul 2019
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.