Function type naming conventions (original) (raw)
Remi Forax forax at univ-mlv.fr
Tue Jan 29 13:47:00 PST 2013
- Previous message: Function type naming conventions
- Next message: Function type naming conventions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 01/29/2013 07:31 PM, Kevin Bourrillion wrote:
All right, how many mistakes am I already making here? :-)
(I keep forgetting if there is a url where I can browse the very-latest lambda sources as checked in.) Functions: *
To Object To int To double From Object Function ToIntFunction ToDoubleFunction From int IntFunction IntToIntFunction IntToDoubleFunction From double DoubleFunction DoubleToIntFunction DoubleToDoubleFunction
BiConsumers:* * Then Object Then int Then double First Object BiConsumer ObjIntConsumer ObjDoubleConsumer First int - IntIntConsumer* IntDoubleConsumer First double - - DoubleDoubleConsumer * * or is it IntBiConsumer?
and DoubleDoubleConsumer can be DoubleBiConsumer too, may be we should use the BiPrefix only if it's ObjectObject
Rémi
On Tue, Jan 29, 2013 at 9:36 AM, Brian Goetz <brian.goetz at oracle.com_ _<mailto:brian.goetz at oracle.com>> wrote: Still some holes, e.g., doesn't tell me which of the following is right: ObjObjToIntFunction BiToIntFunction ToIntBiFunction
The second one is definitely wrong because we put type modifiers first. So somewhere it should say: [ type arg specializations ] [ return specialization ] [ arity ] base Of the remaining (and many like it), there are always going to be multiple ways to name the same thing. So its not that (1) is wrong and (3) is right. Both are consistent (as is ObjObjToIntBiFunction). But we should have some rules for which we prefer. --tim On Tue, Jan 29, 2013 at 12:06 PM, Paul Sandoz <paul.sandoz at oracle.com <mailto:paul.sandoz at oracle.com> <mailto:paul.sandoz at oracle.com_ _<mailto:paul.sandoz at oracle.com>>> wrote: On Jan 29, 2013, at 5:48 PM, Kevin Bourrillion <kevinb at google.com <mailto:kevinb at google.com> <mailto:kevinb at google.com <mailto:kevinb at google.com>>> wrote: Does anyone have a complete and current taxonomy of where exactly we've ended up with all this (leaving out all the history of how we got here)? Does the following suffice? http://hg.openjdk.java.net/lambda/lambda/jdk/file/5d4167b7bf8c/src/share/classes/java/util/function/package-info.java Paul.
On Thu, Jan 24, 2013 at 2:47 PM, Tim Peierls <tim at peierls.net <mailto:tim at peierls.net> <mailto:tim at peierls.net <mailto:tim at peierls.net>>> wrote: On Thu, Jan 24, 2013 at 5:20 PM, Joe Bowbeer <joe.bowbeer at gmail.com_ _<mailto:joe.bowbeer at gmail.com> <mailto:joe.bowbeer at gmail.com_ _<mailto:joe.bowbeer at gmail.com>>>wrote: +1 ObjIntBlock (or a more descriptive "Block" name if one is selected) Agreed. Works well in conjunction with Dan Smith's suggestion ('if the base type is parameterized in both its parameters and return, then the "To" prefix is mandatory. If not, "To" is not used.'), omitting To and Bi where they aren't needed. --tim
-- Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com <mailto:kevinb at google.com> <mailto:kevinb at google.com <mailto:kevinb at google.com>>
-- Kevin Bourrillion | Java Librarian | Google, Inc. |kevinb at google.com <mailto:kevinb at google.com>
- 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