Alex Levenson
Alex Levenson
After some discussion with @johnynek on gitter, I feel like adding a new method probably makes more sense. Something like .scanByKey as @ianoc mentioned. We could debate about whether .sumByKey...
If we go the route of having 2 methods, couldn't the one with untrustworthy return values simply not have a return value?
Well, for better migration we could have .sumByKey keeps its return value and returns all the deltas (so sumByKey becomes the proposed scanByKey), and then have the more efficient .unitSumByKey...
@ianoc oh I meant: 1) change .sumByKey to have the new behavior that @johnynek wants of returning all deltas, not arbitrarily collapsed deltas, which is a type safe change but...
So there's a way to do this with 0 migration, which would be leave .sumByKey alone, and add .unitSumByKey and .scanSumByKey. The only unfortunate thing about that is .sumByKey is...
I'm not sure but we might need two base sets of laws, laws for online and laws for offline