Lambdas and serialization

Llewellyn Falco isidore at setgame.com
Wed Oct 27 03:48:02 PDT 2010


Everybody seems to be thinking of lambdas from the "I want to create a
lambda" side of the fence.
allow me to comment from the "I want to consume a lambda" side of the fence.

As I understand it the method

<T> T max(List<T> from, Comparable<T> c)

should be invokable via a lambda?

if this is correct, then by the time the lambda reaches this consuming
method, the fact it was created by lambda should *no longer be relevant*.

By this logic, if the rules for a consuming method signature would allow for
the parameter to be serialized, then the lambda should conform to those
rules.

Llewellyn

btw: what happens with comparator? it's not a SAM (2 methods - compare,
equals), but seems to be a very wanted case for lambdas?


More information about the lambda-dev mailing list