Another idea for the interface of the diff algorithm #203
Replies: 1 comment
-
While I agree that a range-like interface is more C++-ish and more composable with the Ranges in C++20, I find the current interface more efficient. This is why Immer provides its own Except in C++20, maybe they could be implemented more easily using coroutines. In that case, maybe it could be a C++20 add-on, or even something that people just do in their code-base. Sadly I am not on C++20 yet on my main projects now to experiment. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I had another idea about the interface of the diff algorithm.
I wonder, if it's better or more C++-like to provide a range instead of callbacks:
We could also add an enum to the struct to distinguish added/changed/removed.
I had the idea, because I wanted only the keys of the items that changed in a immer::map.
What do you think?
Best wishes,
Florian
Beta Was this translation helpful? Give feedback.
All reactions