Substitute for Functions.string() ?

Mike Duigou 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.

Mike

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?
> 
> Regards,
> Michael
> 
> 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.
>> 
>> Mike
>> 
>> 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() ?
>>> 
>>> Regards,
>>> Michael
>>> 
>> 



More information about the lambda-dev mailing list