Substitute for Functions.string() ?
mike.duigou at oracle.com
Wed Mar 20 11:06:23 PDT 2013
Mostly that it was extra clutter. It became just a third choice in addition to the two method reference choices we've talked about as replacements. Object::toString is only bad because it doesn't handle null. If your use case doesn't involve null then Object:toString is the best choice.
On Mar 20 2013, at 11:03 , Michael Nascimento wrote:
> What is the rationale to remove it given developers will probably make
> the same bad choice I was doing?
> On Wed, Mar 20, 2013 at 2:59 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
>> String::valueOf is the best choice. It is what Functions.string() used to use.
>> On Mar 20 2013, at 10:52 , Michael Nascimento wrote:
>>> Hi guys,
>>> My code was using Functions.string() before b81. What is the
>>> alternative now? Object::toString() ?
More information about the lambda-dev