weakref proposal update

# Dean Tribble (6 years ago)

This is just a heads up that the WeakRefs presentation has been updated with the improved API and semantics, based on various issues and discussions from the first version of the proposal. The new version is updated in place and is still at:

tc39/proposal-weakrefs/blob/master/specs/Weak References for EcmaScript.pdf

The update for the proposal document itself is still in progress. I will reply here when it is updated (this week).

Thank you to all the people who posted issues and examples and participated in those discussions.

# Dean Tribble (6 years ago)

We got another round of insurmountably good feedback, so I revised the presentation again and am back to writing spec text.

I will get the revised spectext out before finishing the revision of the accompanying proposal doc, which is primarily background and explanation.

# Dean Tribble (6 years ago)

A first round of spec-text is now pushed for the new APIs at tc39/proposal-weakrefs/blob/master/specs/spec.md.

A note on the API change in the last presentation: it looks larger than it appears.

  1. Some of WeakRef was pushed in to a new parent, "WeakCell", so that it could better support long terms in wasm, and because there's now two types,
  2. WeakRefGroup was renamed to WeakFactory.

WeakRef is unchanged (and creation still preserves the Target until the end of turn). The new "WeakCell" is for finalization only, so it doesn't have a deref() and creation does not strongly preserve the Target until the end of the turn.

# Dean Tribble (6 years ago)

er, by "it looks larger than it appears" I meant "it's smaller than it appears" or "it looks much larger than it is" or some such :).