|laziness, impatience, and hubris|
Re^8: Better mousetrap (getting top N values from list X)by BrowserUk (Patriarch)
|on Feb 04, 2005 at 00:34 UTC||Need Help??|
You do see the contradiction though?
For an algorithm that produces a subset m of a set N, duplicating N so that you can produce the subset lazily always consumes more storage--not to mention the overhead of tieing the iterator, retaining it's state etc.
That's one of my bug bears with FP. They claim it produces proveably correct code by avoiding side effects, or putting things into variables and so forth, but what they gloss over is that you still retain state, you just put it all on the either the program stack or continuation stack or some other internal stack where the programmer cannot see it, or test it or verify it. Or control it.
Until they find a way to prove that the FP interpreter or compiler (usually written in C!) cannot corrupt it's own stack, every other claim of proveability is built on sand.
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.