akka-stream-contrib icon indicating copy to clipboard operation
akka-stream-contrib copied to clipboard

Do we need Accumulate

Open hseeberger opened this issue 8 years ago • 4 comments

According to the docs (I wrote): "This stage emits folded values like scan, but the first element emitted is not the zero value but the result of applying the given function to the given zero value and the first pushed element."

The same can be achieved with scan(...)(...).drop(1).

What do others think?

hseeberger avatar Jul 07 '16 17:07 hseeberger

@patriknw, @ktoso, (other Akka team members), I suggest we get rid of this beautiful piece of code again, because it's simpler to use the two well known standard stages scan and drop in combination instead of introducing another one which is very similar to scan. If you agree, I'd create a PR which deprecates Accumulate.

hseeberger avatar Jul 11 '16 14:07 hseeberger

@patriknw, @ktoso, @drewhk, any opinions?

hseeberger avatar Jul 21 '16 13:07 hseeberger

The custom stage is more efficient, however it does not show good example to users (build from existing ops), so maybe better removing it.

drewhk avatar Jul 22 '16 11:07 drewhk

I agree with deprecation and mention scan+drop as a replacement.

johanandren avatar Sep 27 '16 11:09 johanandren