[concurrency-interest] Ops type names
joe.bowbeer at gmail.com
Sun Jan 27 17:09:52 EST 2008
On Jan 15, 2008 8:12 AM, Joshua Bloch <josh at bloch.us> wrote:
> Hmmm... the onInt and withInt don't really feel right to me. If people
> don't like intOp (or intFn), then I think we should go with David's
> inclination (intToInt).
I'm not sure where the thinking on this is at the moment, but after
finally coding an example(!), I agree with David that intToInt and
LongToLong are better than IntOp and LongOp, respectively.
The Ops table is so big that some consistent convention is better than
a couple shorter names.
1. When searching through the Ops in my IDE, I'd like to remember only
one thing: the naming convention. That will allow me to start typing
and tabbing and eventually find the Op I'm looking for.
2. When reading my code, the Ops prefix signals me to "load" the
naming convention into my memory so that I can make sense of the type
name that follows. For this, a consistent convention is better than
one with (even) a couple exceptions.
More information about the Concurrency-interest