In its current form, the .distinct operator uses an internal Hash to keep track of seen keys. This may be a good default, but does not scale for extensive or long-running streams. RxJS solves this by allowing to provide a "flush" observable, but purging the entire memory is not alwsys acceptable. Rather, .distinct should accept a hash-like object as input so that the user can implement a suitable pruning strategy or even have a memory backed by disk. This would also allow multiple streams to coordinate distinctiveness without merging streams.
In its current form, the .distinct operator uses an internal Hash to keep track of seen keys. This may be a good default, but does not scale for extensive or long-running streams. RxJS solves this by allowing to provide a "flush" observable, but purging the entire memory is not alwsys acceptable. Rather, .distinct should accept a hash-like object as input so that the user can implement a suitable pruning strategy or even have a memory backed by disk. This would also allow multiple streams to coordinate distinctiveness without merging streams.