I see two options:
- Maybe the update functions can tell if a change was performed.
- Maybe the guards can be exported functions that state if a change was performed or not.
1 Cons
- The update functions have to return a tuple?
2 Cons
- The guards shouldn't be too underperforming to avoid the overhead of running them twice.
- The guards will be run twice.
1 Pros
- The guards can still be functions.
- The guards will only be run once.
2 Pros
- The user can check if the function will or not perform an action without running the action itself, opening other kinds of branching.
Update:
I think I like option 1, with option 2.
I see two options:
1 Cons
2 Cons
1 Pros
2 Pros
Update:
I think I like option 1, with option 2.