[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: functional languages ill-suited for large programs?

Quoting Ken Shan <ken@digitas.harvard.edu>:
> vkarvone@mappi.helsinki.fi wrote in article
> <1067637367.3fa2da77da4ea@www3.helsinki.fi> 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.

You have a point there. The main crucial difference is that I was talking
about a general optimization, as performed automatically by a compiler,
rather than about one possible manually chosen implementation technique that
is syntactically obvious from the code. Keep in mind that the original claim
was that a compiler could do the optimization (transforming an arbitrary
algorithm into a dynamic programming version of the algorithm)
automatically. If you examine my claim from that perspective, then it should
be clear that there is a huge difference between trivial lazy data
structures and a general dynamic programming optimization.

  Vesa Karvonen