Primitive streams (original) (raw)
Brian Goetz brian.goetz at oracle.com
Fri Dec 28 11:50:27 PST 2012
- Previous message: Primitive streams
- Next message: Primitive streams
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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).
- Previous message: Primitive streams
- Next message: Primitive streams
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-experts mailing list