[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: functional languages ill-suited for large programs?
email@example.com wrote in article <firstname.lastname@example.org> in gmane.comp.lang.lightweight:
> Note that trivial delaying of computation, like is done implicitly by lazy
> languages, has basically almost nothing to do with the kind of "caching
> optimizations", or the algorithm design technique known as Dynamic
> Programming, that I believe we have been discussing here.
I'm not so sure. Memoization ("caching optimizations") and dynamic
programming can be simulated using a lazily evaluated table of results.
For instance, we can memoize the factorial function by making an
infinite factorial table (either a list or an array), lazily evaluated.
We can also memoize a string parsing function by making a pyramid-shaped
table of which substrings parse as which nonterminals, lazily evaluated.
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
The above link is incorrect. Edit at http://www.eecs.harvard.edu/~stein/