Purity (D2 standard libraries / object.d)

Walter Bright newshound1 at digitalmars.com
Fri Jan 9 18:24:32 PST 2009


Jason House wrote:
> Somehow, I had the impression that D might use memoization as some
> kind of optimization once pure functions are embraced.  That was
> probably a misunderstanding on my part.

Another word for that is "common subexpressions". And yes, the compiler 
has the option to do that, and in fact does do that (in a small way) in 
the latest release. But what I was talking about is the user himself 
doing memoization.



More information about the Digitalmars-d mailing list