State of the Lambda

John Nilsson john at milsson.nu
Thu Jul 8 12:39:11 PDT 2010


All in all I like the approach you are taking, do agree with the -1 on
yield though.

One question wrt method references: do you intend to support "unbound"
references to to instance methods? The use case being a shorter syntax
to define expression lists in query like expression. I.e. With the
current proposal I guess I could have an expression like this:

    select<Person>({ p -> p.getName() }, { p -> p.getAge() }).from(persons)

A use case I imagine won't be to uncommon. F.ex. in our system we have
resorted to strings and reflection to select properties from objects.

    select("name","age").from(persons)

By "unbound" method reference I thus mean any syntactic sugar that
shortens the syntactic distance between the two expressions.

BR,
John


More information about the lambda-dev mailing list