Walter Bright Wrote:

> bearophile wrote:
> > Walter Bright:
> > 
> >> Executive summary: pure functions and immutable data structures help 
> >> manage program complexity.
> > 
> > At the moment in D there aren't many immutable data structures available, 
> > but of course they can be written.
> > Such data structures often put the GC under some/high pressure. I don't 
> > know if the current D GC is able to cope.
> 
> I don't understand your comment. With immutable being transitive, any 
> data structure can be made immutable. The GC doesn't care if a data 
> structure is immutable or not, I don't see how that affects its operation.

Think about what happens when you want to mutate an immutable data structure. 
You must create one or more new objects. That increases the number of objects 
for the GC to handle 

Reply via email to