Fusion icon indicating copy to clipboard operation
Fusion copied to clipboard

Rename `StateObject:get()` to better fit its new behaviour

Open dphfox opened this issue 3 years ago • 0 comments

If we're going ahead with #111, then we'll be changing the behaviour of :get() here to explicitly only return a value, without adding any dependencies whatsoever. However, this might not necessarily be how someone would expect the API to work; it's possible someone might think that :get() still adds dependencies as it once did, or still have leftover code in some corner of their codebase which wasn't updated correctly.

With this in mind, it might be a good idea to choose a new name for the method (preferably one less overloaded with interpretations) to reflect the fact that it no longer does the same thing, and is much more passive in nature. I like the sound of :peek() (as in, to 'peek at' the value without invoking any dependency-adding code) but other suggestions would be welcome here too.

dphfox avatar May 08 '22 16:05 dphfox