From the issue tracker
richard.warburton at gmail.com
Thu Aug 15 06:26:47 PDT 2013
> Summary: What shoudl the specified toString behavior of lambdas be?
> Disposition: no decision reached
Has a decision been made about toString() on method references? That seems
like something where it would be possible to provide a nice, usable String
I think this kind of issue is quite important from a debugging point of
view, since many IDEs use 'toString()' as their default method of
formatting many values in "expression" or "variables" views is to use
toString(). One of the annoying issues if you're trying to debug callback
heavy code is identifying which callback is being referenced where.
Anonymous inner classes don't provide a toString() by default that lets
you locate the code very well. Eg: in order to locate "Foo$4 at 31232" I
would have to look for the 4th anonymous inner class in the class Foo. I'm
sure there are several ways to skin the cat, but if the serialisation
format provided the line number at which the lambda expression starts as
part of its toString() it would make things like much easier.
Dr. Richard Warburton
More information about the lambda-spec-observers