💾 Archived View for heavysquare.com › notes › FFF5-mutable-set-api-poor-readability.txt captured on 2021-12-04 at 18:04:22.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-


~~ 2020-12-29T21:48:27+01:00

How would you name a variable that has the purpose of pointing to a
difference of two sets?

Name it like 'entitiesNotInDatabase' and it'll be weird to read the code
until entities in the database are removed.

Name it allEntities and it'll lie to you after removal.

ie

var s = // some set

s.removeAll(someOtherSet)

// use s