Re: Immutable data not copied

2009-12-09 Thread Tomek Sowiński
Dnia 09-12-2009 o 09:54:33 Lutger napisał(a): Tomek Sowiński wrote: const(FAQ) says: "When doing a deep copy of a data structure, the invariant portions need not be copied." I'm trying to imagine what code would benefit from such optimization. immutable struct Large { whole lotta data... }

Re: Immutable data not copied

2009-12-09 Thread Lutger
Tomek Sowiński wrote: > const(FAQ) says: "When doing a deep copy of a data structure, the > invariant portions need not be copied." > I'm trying to imagine what code would benefit from such optimization. > > immutable struct Large { whole lotta data... } > > struct Other { Large l; } > > void f

Re: Immutable data not copied

2009-12-08 Thread Simen kjaeraas
On Wed, 09 Dec 2009 01:18:46 +0100, Tomek Sowiński wrote: const(FAQ) says: "When doing a deep copy of a data structure, the invariant portions need not be copied." I'm trying to imagine what code would benefit from such optimization. immutable struct Large { whole lotta data... } struct Oth

Immutable data not copied

2009-12-08 Thread Tomek Sowiński
const(FAQ) says: "When doing a deep copy of a data structure, the invariant portions need not be copied." I'm trying to imagine what code would benefit from such optimization. immutable struct Large { whole lotta data... } struct Other { Large l; } void funkcja(Large s); // no reference anno