RFC: scope and borrowing

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 23 05:12:48 PDT 2014


Steven Schveighoffer:

> This begs the question, what is the point of having "strong 
> purity" if you can't optimize based on it?

Linear typing gives some guarantees that help the GC a lot, and 
avoid some coding mistakes. And some people could answer you that 
having (strongly) pure functions is a quality regardless of 
optimizations, because it makes both unit testing and code 
understanding simpler :-) I am not very expert on this stuff, I 
need to learn more.

Bye,
bearophile


More information about the Digitalmars-d mailing list