[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: functional languages ill-suited for large programs?
Tom Lord <email@example.com> writes:
> Has anyone ever tried to make a purely functional, lazy language
> implementation in which _every_ function is implicitly cached? The
> compiler optimization shifts in that case from "when should F be
> cached" to "when is clearly not worth bothering caching F" which is an
> easier (but still open-ended) problem.
Perry, do you remember the name of that very bright fellow from
M.I.T. who was at Bellcore the summer I was there? He wore a tie
every day, and he was great company.
He had just implemented a little pure functional language that
memoized eval, and he had some really weird and interesting results
from it. Having to do with garbage collection, I think... having
everything memoized somehow changed the properties you needed from
your GC. The memoization cache gave you enough info that you *could*
replace a value with the thunk you'd thawed to compute it, so you
could throw away any object you wanted, if you didn't mind recomputing
it. And since all the intermediate evaluation results were memoized
too, you wouldn't have to recompute much. I guess it was like being
able to GC individual steps of the computation at will.
There was some reason quoted constants didn't work out quite as one
would hope. But I can't imagine why that would be; you could always
just treat a quoted expression like a backquote with no unquotes, and
that's just ordinary code --- no? I argued with him about it at the
time, but he indicated I was missing his point.
He was Sussman's student, getting his BS and Master's all in five
years. Or something like that. That was, um, 1989, so I may have it