One-sided instantiation (diamond, collection literals)

Mark Mahieu markmahieu at
Mon Nov 2 14:52:13 PST 2009

On 2 Nov 2009, at 22:27, Barney Pitt wrote:
> Let me propose a simple language change which achieves this not  
> only when declaring collections and generically defined objects,  
> but for all cases where an object is declared and instantiated.
> Any statement of the form
> Foo foo=new Foo(myBar, myBaz);
> can be replaced by
> Foo foo(myBar, myBaz);

OK, so what would this mean?

interface I {
	String s();



More information about the coin-dev mailing list