Re: java.util.stream 'map' method, proposal of method name change

2017-08-21 Thread Krunoslav Magazin
Thank you all on comments. I have studied referenced sources and now I will upgrade my initial comment in context of mentioned mutative update. I find now that first question that need answer is what is the definition of stream and how pipeline of operations relate to stream. Method 'map' implies

Re: java.util.stream 'map' method, proposal of method name change

2017-08-18 Thread Andrew Dinn
On 16/08/17 13:26, Remi Forax wrote: > the name comes from Lisp > https://en.m.wikipedia.org/wiki/Map_(higher-order_function) Actually, the Lisp usage comes from mathematics: https://en.wikipedia.org/wiki/Map_(mathematics) Since the original conception of Lisp was lambda calculus realised as a

Re: java.util.stream 'map' method, proposal of method name change

2017-08-16 Thread Remi Forax
On August 15, 2017 6:51:00 PM GMT+02:00, Jonathan Bluett-Duncan wrote: >Hi Krunoslav, > >I think the reason the method was named `map` rather than `replaceWith` >or >an equivalent name, is because `map` is a well-known name for this >sort of *higher-order >function*. The name itself has been ar

Re: java.util.stream 'map' method, proposal of method name change

2017-08-15 Thread Brian Goetz
Naming is a deeply subjective thing; whatever names we chose, invariably someone (or many someones) would come along and say "why didn't you choose X." Sometimes there's a good reason why the proposed X is clearly worse; sometimes its just a subjective association. But of course, we have to p

Re: java.util.stream 'map' method, proposal of method name change

2017-08-15 Thread Jonathan Bluett-Duncan
Hi Krunoslav, I think the reason the method was named `map` rather than `replaceWith` or an equivalent name, is because `map` is a well-known name for this sort of *higher-order function*. The name itself has been around in functional programming languages like Haskell and Scala and programming mo

java.util.stream 'map' method, proposal of method name change

2017-08-15 Thread Krunoslav Magazin
Hi. When using java.util.stream 'map' method my opinion is that 'replaceWith' as method name would better describe what method do. 'map' method is applied on input stream, returns output stream but returned stream elements are return values from 'map' method Function argument. We continue our work