Problem with method references
scolebourne at joda.org
Fri Jan 14 09:35:03 PST 2011
On 14 January 2011 16:38, Brian Goetz <brian.goetz at oracle.com> wrote:
>> Something like: new#Integer(int)
> I think we'd discussed
Since there is talk of keeping the ref and immediate syntaxes the
same, perhaps we should consider adding a synonm for object
Integer a = new Integer(2);
Integer a = Integer.new(2);
I'd love to see that as it would make it much easier to discover
whether 'new' or a factory should be used when using an IDE.
Integer a = Integer.<ctrl-space> -> choice of 'new' or 'valueOf'
Going even further, there could be a way to make certain factories
used in place of 'new'.
More information about the lambda-dev