[Haskell-cafe] Why does not Haskell have built-in memoization support?

Andraž Bajt edofic at gmail.com
Thu Mar 27 12:06:45 UTC 2014


Because that would imply you store all calls(parameters and results) during 
the program execution. And that would require potentialy infinite memory.

You might argue that only some need to be memoized. And this is precisely 
the case. But this reasoning(which to memoize) cannot be fully 
automated(yet).

On Wednesday, March 26, 2014 8:42:32 AM UTC+1, Cosmia Luna wrote:
>
> Hi everyone, I'm new to Haskell.
>
> I'm confused about the pure function and lazy evaluation in Haskell. Why 
> there is not built-in support for memoization, with the fact that calls 
> with same parameters returns the same result?
>
>
> ----
> Cosmia
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140327/f1530296/attachment.html>


More information about the Haskell-Cafe mailing list