Let's please rename Block to Receiver before it's too late
Raab, Donald
Donald.Raab at gs.com
Fri Jan 18 14:08:57 PST 2013
This ex-Smalltalker still prefers Procedure. I also prefer either spelling things out completely (Binary vs. Bi), or going to the other extreme (suffix with 1, 2, 3, 4...).
Please can we rename collect as well. Here's an example of collect being used with GS Collections in our Kata.
MutableList<Customer> customers = this.company.getCustomers();
Set<String> customerNamesSet = customers.collect(Customer::getName).stream().collect(Collectors.<String>toSet());
This will be very confusing for developers who use our library.
I have been mostly fine up till now on the method name choices, as there has been only a few overlaps with names in our space (e.g. forEach, sort, groupBy). At least with these names the meaning has been more or less the same. I usually teach people that collect=map/transform, select=filter, groupBy=groupBy, etc. Collect!=collect is not something I would look forward to explaining.
> -----Original Message-----
> From: lambda-libs-spec-experts-bounces at openjdk.java.net [mailto:lambda-
> libs-spec-experts-bounces at openjdk.java.net] On Behalf Of Doug Lea
> Sent: Friday, January 18, 2013 3:57 PM
> To: lambda-libs-spec-experts at openjdk.java.net
> Subject: Re: Let's please rename Block to Receiver before it's too late
>
>
> I've never much liked Block. (Maybe only ex-smalltalkers actually prefer
> it?) I hadn't thought about it much lately after we rejected the obviously
> (to me) best choice of "Action" (because Swing took that name) and second
> choice Procedure.
> Having typed "block" hundreds of times in the past few weeks, I'm finally
> getting to the point of not being overly distracted by it though.
>
More information about the lambda-libs-spec-observers
mailing list