Function type naming conventions (original) (raw)

Doug Lea dl at cs.oswego.edu
Fri Jan 11 08:46:11 PST 2013


On 01/11/13 11:24, Dan Smith wrote:

I've been kicking around an idea in my head for the last few days and haven't rejected it as horrible yet:

"integer-valued function" (and "foo-valued function," generally) is the appropriate, widely-understood term for functions that output integers [1][2][3][4]. So let's just say that, slightly abbreviated: IntValFunction // T -> int The meaning should be unambiguous.

Only if you mentally associate "val" with the result :-)

The more I see of alternatives, the more I like the clunky, uncreative but clear one.

IntToObjectFunction ObjectToIntFunction IntToDoubleFunction LongToIntFunction

etc

Plus still keeping ...

IntUnaryOperator IntBinaryOperator IntPredicate IntBlock

etc

-Doug



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