Function parameter order
Doug Lea
dl at cs.oswego.edu
Wed Nov 7 09:36:17 PST 2012
On 11/07/12 11:49, Tim Peierls wrote:
> Since specialized types are an ugly but necessary wart, and since often the
> names won't be seen by users, it's OK to have ungainly names as long as they are
> clear. I wouldn't worry too much about consistency over clarity.
>
> So, FunctionToIntFrom<X>, FunctionFromIntTo<Y>. PredicateOfInt ... the marker
> words help me understand without having to know an arbitrary rule.
>
... although the ones with multiple arguments evade any scheme
short of x-by-y-to-z, as in ObjectByObjectToDouble<A,B>. (See my
my "tyranny of names" post, and the CHM placeholder names
http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java/util/concurrent/ConcurrentHashMap.html).
> On Wed, Nov 7, 2012 at 11:24 AM, Brian Goetz <brian.goetz at oracle.com
> <mailto:brian.goetz at oracle.com>> wrote:
>
> I'm hearing is complaining that they don't like the proposed solution.
>
When the only proposal is to paint another bike shed puke-green, it is not
surprising than the only reaction is: please not another puke-green one!
>>
>> Also, note that the return-first approach is more consistent with how
>> Java declares methods:
And defining lambda syntax as exp <- arg, not arg -> exp would also be more
consistent, but no one has ever suggested this.
-Doug
More information about the lambda-libs-spec-observers
mailing list