Popular conceit about learning programming languages
Lulu of the Lotus-Eaters
mertz at gnosis.cx
Mon Nov 25 14:25:24 EST 2002
|Lulu of the Lotus-Eaters <mertz at gnosis.cx> writes:
|> The term 'strict' has another antonym that is probably more useful:
|> 'lazy'.
Michael Hudson <mwh at python.net> wrote previously:
|But I think in technical pointy-eared CS speak, 'lazy' has a technical
|meaning that differs slightly from what Haskell does.
|I used to know the difference, but I've forgotten; something like lazy
|means you evaluate a subexpression *each* time its value is used?
|Haskell doesn't do that.
There might well be a difference between "non-strict" and "lazy" that I
am unaware of. I know these things only casually, not in a pointy-eared
CS way.
But for a pure functional language to evaluate a subexpression each
time its value is used is just plain foolish. Since you know--by
definition once state is removed--that a subexpression will always
evaluate to the same thing, deciding never to cache that value is
pointless. I kinda suspect that whatever "lazy" really means precisely,
it isn't "burns cycles needlessly" :-).
Yours, Lulu...
--
Keeping medicines from the bloodstreams of the sick; food from the bellies of
the hungry; books from the hands of the uneducated; technology from the
underdeveloped; and putting advocates of freedom in prisons. Intellectual
property is to the 21st century what the slave trade was to the 16th.
More information about the Python-list
mailing list