Function type naming conventions (original) (raw)
Tim Peierls tim at peierls.net
Wed Jan 23 13:22:27 PST 2013
- Previous message: Function type naming conventions
- Next message: Function type naming conventions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jan 23, 2013 at 3:34 PM, Remi Forax <forax at univ-mlv.fr> wrote:
> UnaryOperator extends Function<T,T> > BinaryOperator extends BiFunction<T,T,T>
UnaryOperator should be Operator and BinaryOperator should be BiOperator, it's just more regular. Operator extends Function<T,T> BiOperator extends BiFunction<T,T,T>
The reason to have these "convenience" types in the first place is so they'll be easy to remember and recognize. The term "function" is much more commonly used to mean "function of one argument", so Function/BiFunction is better than UnaryFunction/BinaryFunction. The term "operator" skew more evenly between unary and binary, so UnaryOperator/BinaryOperator is better than Operator/BiOperator.
--tim
- 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