Function type naming conventions (original) (raw)

Dan Smith daniel.smith at oracle.com
Fri Jan 11 09:28:09 PST 2013


On Jan 11, 2013, at 9:46 AM, Doug Lea <dl at cs.oswego.edu> wrote:

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 :-)

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."

—Dan



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