[Haskell-cafe] Re: Channel9 Interview: What makes imperative programming so difficult

Dougal Stanton ithika at gmail.com
Wed Jan 31 10:55:51 EST 2007

Quoth Doaitse Swierstra, nevermore,
>  digest.chew.eat.serve.cook.chop.pluck.kill $ chicken
> we all have a definite feeling that after applying the functions, the  
> original object is no longer available, and the FP view does not feel  
> entirely natural.

Yes, that is true. I can sort of see why people might object to the IO
monad in this case, since it explicitly prevents the programmer from
reusing old data. Of course, one might argue that it's not really the
*monad* that prevents it, but the construction of the physical world.
The monad merely prevents us from trying to eat our cake and have it.

Is there a computing-realm equivalent of your chicken example? For
example, an IO-monadic "removeFile" will obliterate the chicken, but if
we load the chicken into memory first we can recreate the same chicken

I think this is why analogies never stretch very far in computing. ;-)



More information about the Haskell-Cafe mailing list