Heads up: Mapper<T, R> -> Mapper<R, T>

Brian Goetz brian.goetz at oracle.com
Tue Nov 6 16:14:47 PST 2012


These are the java naming conventions (unless we change them).  

However, were not going to have that discussion here.  Discussions about naming conventions is completely off topic for this list. 

Sent from my iPhone

On Nov 6, 2012, at 6:53 PM, Pablo Grisafi <pablogrisafi1975 at gmail.com> wrote:

> Can we please abandon the horrible misleading one-letter-for-types convention?
> Looks like we are in programming in BASIC again
> Let's use good intention revealing names, please
> Name<Result, Parameter> or Name<Input, Output> or even Name<TInput,
> TOutput> are way better than Name<T,R>
> For one type argument classes, like List<E>, it is not that important,
> but even in that case, List<Element> is better
> Sorry if my English is not good enough. Sometimes I think I'm the only
> average Java programmer reading this list.
> Am I missing some clever reason why we are using the one-letter convention?
> 
> Pablo Grisafi
> pablogrisafi1975 at gmail.com
> 
>> ---------- Forwarded message ----------
>> From: Paul Benedict <pbenedict at apache.org>
>> To: Jonathan Gibbons <jonathan.gibbons at oracle.com>
>> Cc: lambda-dev at openjdk.java.net
>> Date: Tue, 6 Nov 2012 13:06:03 -0600
>> Subject: Re: Heads up: Mapper<T, R> -> Mapper<R, T>
>> Is R and P better than I and O? I don't think I could guess R and P
>> without
>> reading the javadoc. I and O, I can (no pun).
>> 
>> On Tue, Nov 6, 2012 at 12:59 PM, Jonathan Gibbons <
>> jonathan.gibbons at oracle.com> wrote:
>> 
>>> Can I suggest that we at least try and establish some naming convention
>>> as well, so that we are not just relying on positional conventions.
>>> 
>>> There are already some JDK APIs with "result first, then parameter",
>>> using the convention   Name<R, P>   R for Result, P for Parameter
>>> 
>>> -- Jon
> 


More information about the lambda-dev mailing list