Question: Why is `toggle` function not a standard part of Set packages API?

On the other hand, setting the value directly, rather than using something like toggle is susceptible to the stale update bug.

I’ve thought a lot about how to avoid both of these classes of bugs, and have never come up with a good solution.

2 Likes