Recently, I've been playing with scalaz.iteratee and Play's iteratee. I think that iteratee is a great idea to provide modularity instead of the old imperative while loop -- the aim is to use a function as a handler of each new line instead of getting string[] out of file.
However, when I look at the feature overview of scalaz.stream, it mentions that the design of that is to supersede the old iteratee implementation, but it doesn't mention why they want to replace it.
Can someone explain to me if we can Stream, what feature and benefits we can obtain and also what is drawback of using iteratee?
Iteratee is much harder to work with compare to scalaz-stream. Scalaz-stream as well are superior to iteratees in terms of code-reuse and composition.
In fact the whole "servers" can be now implemented in scalaz-stream instead just small programs or pieces of code like with Iteratee pattern.
Scalaz-stream gives you superior resource safety, termination reason propagation, fine-tuned concurrency control, tons of combinators and is easy to extend.
We have now project that is 200K + scalaz stream code, and is complex multi-user multi-homed clustered server(s), all implemented in scalaz stream.
If you would share on what really you want to achieve I can be more "exact" in benefits and give you some quick code samples, that hopefully will prove claims above :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With