Function type naming conventions (original) (raw)

Tim Peierls tim at peierls.net
Thu Jan 24 11:00:04 PST 2013


On Thu, Jan 24, 2013 at 1:52 PM, Dan Smith <daniel.smith at oracle.com> wrote:

Let me propose a slightly different convention: if the base type is parameterized in both its parameters and return, then the "To" prefix is mandatory. If not, "To" is not used.

So:

Function<Foo, Bar>  // Foo -> Bar
ToIntFunction<Foo>  // Foo -> int
Supplier<Bar> // () -> Bar
IntSupplier   // () -> int

Right?

Works for me.

--tim



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