Time to kill T() as (sometimes) working T.init alias ?

Jonathan M Davis jmdavisProg at gmx.com
Sun Dec 9 12:39:22 PST 2012


On Sunday, December 09, 2012 12:36:09 Jonathan M Davis wrote:
> On Sunday, December 09, 2012 21:21:10 Mehrdad wrote:
> > On Sunday, 9 December 2012 at 20:14:18 UTC, Jonathan M Davis
> > 
> > wrote:
> > > Algorithms end up copying all the time
> > 
> > Hmm... like which ones, and copying what kinds of objects?
> 
> Just calling front on a range is going to copy the element...

Oh, and ranges themselves get copied all over the place, so if someone is 
foolish enough to make copying _them_ expensive, they're screwed. Of course, 
if someone actually made a range deep copy with a postblit, that would also 
violate the logic of how ranges even work, but it's an example of a type that 
gets copied a lot, and if copying it were expensive, then performance would 
probably tank.

- Jonathan M Davis


More information about the Digitalmars-d mailing list