Function type naming conventions (original) (raw)

Joe Bowbeer joe.bowbeer at gmail.com
Thu Jan 3 13:37:51 PST 2013


IntFun

Int is already an abbreviation, so combining Int with another abbreviation is consistent. Fun or Func; Op or Oper

On Thu, Jan 3, 2013 at 1:07 PM, Dan Smith <daniel.smith at oracle.com> wrote:

On Jan 2, 2013, at 12:23 PM, Brian Goetz <brian.goetz at oracle.com> wrote:

> Function<T,R> T -> R The fact that this is not "Function<R,T>" makes me extremely happy. :-) On Jan 2, 2013, at 4:32 PM, Tim Peierls <tim at peierls.net> wrote: > I'm sure I'll never remember whether IntFunction is int -> int, T -> int, or int -> T, so it'll trip me up a little each time I read it. Stephen Colebourne makes a similar comment in the comments list. His suggestion is to use a different base name for functions that return primitives -- we already have "Predicate" and "Block"; now we just need "IntThingy" and "DoubleThingy". Stephen suggests "CalcInt", which I don't love, but maybe there's a word out there that nicely conveys the concept much like "Predicate"? —Dan



More information about the lambda-libs-spec-observers mailing list