(original) (raw)

ByteStream seems fundamental. �Wouldn't it be worthwhile to support this?


On Fri, Dec 28, 2012 at 11:50 AM, Brian Goetz <brian.goetz@oracle.com> wrote:
While many Java programmers are unfamiliar with reduce, there are many
FP-aware folks (ruby, groovy, etc) who will want to transfer their
favorite expressions to Java. We shouldn't go out of or way to make this
transfer difficult.

No, we're not going to make this difficult. �Those already familiar with reduce should be pretty happy.

The question is, what should we do to accomodate the other 95% of java developers? �Giving them reduce \*only\* seems like throwing them in the deep end of the pool.


Speaking of favorite expressions, how about char streams? A lot of
functional kata are char based. But are there real �world examples where
lack of CharStream would bite? �In any event don't lose IntStream.

Currently we expose
� String.chars()
� String.codePoints()

as IntStream. �If you want to deal with them as chars, you can downcast them to chars easily enough. �Doesn't seem like an important enough use case to have a whole 'nother set of streams. �(Same with Short, Byte, Float).