Function type naming conventions (original) (raw)
Dan Smith daniel.smith at oracle.com
Fri Jan 4 14:46:35 PST 2013
- Previous message: Function type naming conventions
- Next message: Function type naming conventions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jan 3, 2013, at 2:07 PM, Dan Smith <daniel.smith at oracle.com> 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"?
I did a little Googling: "predicate" is a.k.a. "boolean-valued function". "Real-valued function" and "integer-valued function" are also fairly widely-used terms. But I didn't come across any more concise terms for those...
—Dan
- Previous message: Function type naming conventions
- Next message: Function type naming conventions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-observers mailing list