Fixing const arrays

Jonathan M Davis jmdavisProg at gmx.com
Mon Dec 12 11:12:12 PST 2011


On Monday, December 12, 2011 17:24:38 Jakob Ovrum wrote:
> I'm still a beginner with ranges, but by my understanding and by
> what some people made it sound like, reasonable uses of save
> include some which are non-trivial. If this is true, then
> removing @property from save encourages people to think more
> about what using it might mean for the code they are writing,
> which is definitely important.

Both save and postblit are supposed to be trivial. Algorithms generally assume 
that copying a range is O(1). There's nothing stopping save and postblit from 
costing more than that, but it's going to harm performance.

- Jonathan M Davis


More information about the Digitalmars-d mailing list