Function type naming conventions (original) (raw)
Doug Lea dl at cs.oswego.edu
Fri Jan 11 09:37:31 PST 2013
- Previous message: Function type naming conventions
- Next message: Function type naming conventions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 01/11/13 12:28, Dan Smith wrote:
IntValFunction // T -> int
The meaning should be unambiguous. Only if you mentally associate "val" with the result :-) What I'm hoping to contribute is that, beyond just "I like the way IntValFunction sounds," the established mathematical terminology IS "integer-valued function." If we can express that concisely, then the name says exactly what the type means, without having to invent a new term or fall back to the more verbose "function from integer to object."
I'm really not trying to be hostile about this, but just noting that the programmer impact of these suggestions relies on common shared conventions/intuitions, but since there currently are none in Java, clarity seems to be the primary goal.
(As evidence, consider discussions of method "fun1.compose(fun2)". Which way does it go? Probably best to have no method just named compose.)
-Doug
- 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