Problem with method references

Stephen Colebourne scolebourne at
Fri Jan 14 09:35:03 PST 2011

On 14 January 2011 16:38, Brian Goetz <brian.goetz at> wrote:
>> Something like:  new#Integer(int)
> I think we'd discussed
>   Integer#new(int)



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 =;

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 mailing list