Ix: Correct .Scan() to use matching behavior by viceroypenguin · Pull Request #1787 · dotnet/reactive
The scan operator in most languages includes the seed or first element. This commit updates the Scan operator in System.Interactive to match both Rx.NET and other languages.
Fixes #1672
The scan operator in most languages includes the seed or first element. This commit updates the Scan operator in System.Interactive to match both Rx.NET and other languages.
Hi. This is a breaking change on an established operator. Imagine, suddenly everyone would get an extra item even though they were fine with not having that first item.
Yes, it is a breaking change. However, it corrects the behavior to match every other implementation of the scan operator (both Rx as well as F#, Haskell, etc.), so it restores expectation of how the operator will work. Breaking change means release should only happen on Major Version (v7).
Alternatives:
a) [Obsolete] the original version with an explanation, but leave it as is, and publish the corrected version under a different name; or
b) Update the documentation to be explicit about the fact that it is an incorrect implementation of the operator, according to common interpretation of scan behavior.
@akarnokd Any thoughts on the three paths forwards?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters