"interact" behaves oddly if used interactively

John Meacham john at repetae.net
Thu Oct 2 15:02:43 EDT 2003


On Thu, Oct 02, 2003 at 12:08:07PM +0100, Nicholas Nethercote wrote:
> But I can't imagine they would complain about the problem of being
> confused... "this strict code evaluated immediately, what's going on?!" :)
> This is because strict evaluation is always easy to understand.
> Lazy/non-strict evaluation can be non-intuitive/confusing/surprising, even
> for people who are used to it.

what is easy or confusing and what becomes intuitive is learned and
depends a lot on background..

take 
x = x * 2

strict programmers think 'double the value of x'
mathematitions think 'x must equal zero'
lazy programmers think 'x is bottom'

There is no reason to think any model is easier to learn than any other,
it just happens that most people who write programs have a background in
strict programming. This property of people should not be used to judge
the systems. IMHO lazy semantics can become just as intuitive and easy
as strict or mathematical semantics.
        John


-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------


More information about the Haskell-Cafe mailing list