Replies: 2 comments 3 replies
-
Oh I love this idea! By default it would be set to 1 but if you set to 0 it would prevent tracking and also would throw an error on accessing previous value. The other value stored is the initial value for reset and disposal. Should something be done with that? Maybe I could include in buffer. Should the int.infinity or similar be used for no limit? Maybe null too |
Beta Was this translation helpful? Give feedback.
-
We may have to create an array of all the possible behaviours :) My expectation would be 0 by default and Can you explain why putting to 0 would prevent tracking? I do not see the connection here. I prefer As you can see this ticket is linked to Option #57 too :D |
Beta Was this translation helpful? Give feedback.
-
Here I share some feedback or potential features around Previous values.
First I found it is a great feature and useful in many case.
My first concern is that since I'm using a lot of signal in means I have (n*2) instances of my signals in memory. So came the idea to not have it mandatory but configurable.
Let's imagine a configurable Buffer of N previous. But default
T previousValue
return the current value because the buffer is empty thus no memory used.We can then configure a buffer to have N memory of previous values.
I can then have
T previousValues
Iterable<T> previousValues
I can accesspreviousValue(2)
Finally we can try to imagine a
rollback()
mechanic wherevalue <- previousValue
and imagine we can chain signals together to rollback.Beta Was this translation helpful? Give feedback.
All reactions