Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Rename WeakFactory to FinalizationGroup #49

Closed
tschneidereit opened this issue Nov 7, 2018 · 1 comment
Closed

Rename WeakFactory to FinalizationGroup #49

tschneidereit opened this issue Nov 7, 2018 · 1 comment

Comments

@tschneidereit
Copy link
Member

I think we should rename WeakFactory, for a couple of reasons:

  1. Grouping lifetimes is the function of this class that's more immediately relevant to developers
  2. It's function as a mechanism for removing the ability to create WeakRefs (while keeping the ability to hand them out) is a very advanced concept that we don't need to put focus on

Realistically speaking, most developers won't have strong intuitions about any of the terms in this domain. Nevertheless, I think we should try to use names that at least guide them in the right direction. In particular, the concept of grouping lifetimes of a set of WeakRefs is important, and I think the solution we settled on is excellent. Now we also need to make it as easy as possible for developers to understand this solution :)

I'm not saying that FinalizationGroup is a fantastic name—in particular it emphasizes only one half of what is provided—, but I do think that it at least points in the right direction, providing a good starting point for learning about the concepts involved via sources like MDN.

@erights, @dtribble, WDYT?

@littledan
Copy link
Member

Thanks for the suggestion; this name change seems to be complete.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants