new operator chaining (D vs Java)

"Luís "Luís
Mon Aug 19 19:11:39 PDT 2013


I've used D to some extent since around 2004, but I don't recall 
noticing this before (although I wouldn't trust 9 year old 
memories!):

     D: (new Class()).foo();

     Java: new Class().foo();

Is there any particular (purposeful) reason why D cannot directly 
chain calls after new? (a quick Google search did not help).


More information about the Digitalmars-d mailing list