Fusion icon indicating copy to clipboard operation
Fusion copied to clipboard

Remove `StateObject:get()` from the public API

Open dphfox opened this issue 3 years ago • 1 comments

Alternate idea to #159 - since we're introducing unwrap() in v0.3, users will already have a great consistent way to get the value of any state object. There's no case where using unwrap() would be disadvantageous over using :get(), and generally using :get() locks your code into only using state objects, so the case for keeping this method public is rather vague and weak.

We'll still need a method like this to exist, of course - unwrap() needs someplace to source its values, after all - but perhaps that is better left as a lower level implementation detail that only the authors of state objects need to worry about, not general users of Fusion.

dphfox avatar Jun 04 '22 16:06 dphfox

Related to #111

dphfox avatar Jun 04 '22 16:06 dphfox

Is there going to be any difference between this and peek()? Provided that we're adding that.

krypt102 avatar Feb 01 '23 01:02 krypt102

Is there going to be any difference between this and peek()? Provided that we're adding that.

See #217 for an explanation of the differences.

dphfox avatar Feb 05 '23 09:02 dphfox