Replies: 1 comment 4 replies
-
Not sure I’d want to make this change. You normally shouldn’t need to check the return value of a setter in ReArch since that often leads to more imperative code. can you share a use case? anyways, this is easy enough to do via a new side effect and a new type def defined in your code. Just not sure I want to commit to it in ReArch. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I remember talking with you about something related.
Having
ValueWrapper
astypedef ValueWrapper<T> = (T Function(), void Function(T));
.I came to situations where I need to know the result of the setter function, whether the value changed or it's considered to be the same.
This would require a minimal change to:
typedef ValueWrapper<T> = (T Function(), bool Function(T));
.It would help to avoid boilerplate (wrappers around that function).
Beta Was this translation helpful? Give feedback.
All reactions