Request for Review (#2) : CR#8001634 : Initial set of lambda functional interfaces (original) (raw)

Tim Peierls tim at peierls.net
Wed Nov 14 09:29:09 PST 2012


Implementing more than one of the functional interfaces sounds like a bad idea; making it difficult or impossible to do is a *good *thing. Use apply everywhere to prevent things like Shimmer implements FloorWax, DessertTopping.

Does anyone have any compelling example of why you actually might want to implement multiple functional interfaces that isn't satisfied by using asFunction, asPredicate, asProcedure, etc. methods?

--tim

On Wed, Nov 14, 2012 at 12:12 PM, Mike Duigou <mike.duigou at oracle.com>wrote:

The issue is primarily when one class wants to implement more than one functional interface. If the names collide then the class will only be able to implement one of the interfaces.

Mike On Nov 14 2012, at 07:12 , Craig P. Motlin wrote: What's the issue with both methods being named apply?

On Tue, Nov 13, 2012 at 2:05 PM, Mike Duigou <mike.duigou at oracle.com>wrote: The name Block.apply currently conflicts with Function.apply and should be renamed.



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