[Haskell-cafe] Functional progr., images,
laziness and all the rest
minh thu
noteed at gmail.com
Thu Jun 22 05:11:39 EDT 2006
hi !
2006/6/22, Brian Hulley <brianh at metamilk.com>:
[snip]
> So:
> 1) Someone reading the code needs to do a lot of work to try to recover the
> original equation
> 2) Wouldn't an imperative loop, using the original equation directly, have
> made everything much simpler?
> 3) Therefore laziness has lead to obfuscated code.
the way i see :
1/ but why do you call it 'original equation' ? the original thing is
expressed informaly in your head, then into a formula or an algorithm.
Here i find the first one-liner really readable. (although i think it
misses Y[0] = X[0]). But the loop is really readable too for
imperative enabled mind.
2/ for me, list or loop is quite the same thing (in this case)
(although loop is mor general since you can use the base index in
weird ways).
3/ see 1/ and 2/
Jerzy :
can you know a mean to express such computation but with elements
depending of time (in about the same way as languages as esterel)
(i.e. depending of IO)?
Paul Hudak uses a Channel in his book Haskell SOE .. but is there another way ?
thanks,
vo minh thu
More information about the Haskell-Cafe
mailing list