class instance construction

spir denis.spir at gmail.com
Thu Nov 11 10:42:59 PST 2010


On Thu, 11 Nov 2010 18:53:56 +0100
Daniel Gibson <metalcaedes at gmail.com> wrote:

> > That being said, I'm really ambivalent on whether this needs to be 
> > included.  It's not that terrible that you have to parenthesize properly.  
> 
> Also, I'm not sure if this is a common case.. although I had similar situations 
> as well (it was more like (new Cursor(somecollection)).where(...).select(..) 
> with where() and select() returning a Cursor that wrapped/used the preceding 
> cursor.. and also it was Java).
> 
> But I don't know if this is useful for other kinds of code that don't deal with 
> collections or similar stuff.

This use case is probably not important enough (even if I use it often :-) to impulse any change in the language. You are right. (I was just showing that "new", in addition to not bringing much, if anything, to the language, can make nice code less readable.)

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d mailing list