Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

lazyness tricks

Name: Anonymous 2011-08-06 1:11

if you have lurked on haskell irc, you'd know that they don't have in very high esteem laziness in haskell, (they see it as a medium to guarantee purity)

but since in the end we need to play with the non-strict semantic. it would come handy to know some techniques only possible in a lazy language.

for example in http://obfuscatedcode.wordpress.com/2008/02/16/functional-pearl-trees/ the author shows how with laziness i can replace in all the leafs with the minimum value in one pass, instead of 2 that would require if we translate directly the strict algorithm to haskell

tl;dr laziness trick for haskell to make more efficient?

Name: Anonymous 2011-08-06 1:20

If you're a lazy programmer, I suggest you stay away. We don't need your weak minded antics infecting our board. Laziness is for chumps.

Name: Anonymous 2011-08-06 1:21

>>2
>our board

as if you could posses a board

Name: Anonymous 2011-08-06 1:21

Just so you know, the inventors of Haskell consider the priority they put on making Haskell a lazy language a mistake

Name: Anonymous 2011-08-06 1:23

Laziness caused the state where all web-oriented languages and technologies are just a bunch of piles of shit cobbled together to cater to the lowest common denominator of developers. Laziness should not be regarded highly.

Name: Anonymous 2011-08-06 1:29

>>4

well not a mistake, but as a way to ensure purity.

also laziness helps with modularity has peyton jhones said. there is a paper, but i don't remember well

Name: Anonymous 2011-08-06 1:31

>>5

are you referring to laziness as a characteristic of a programmer (which seek to do less job) or as a feature of a language ?

Name: Anonymous 2011-08-06 1:55

bumpity

Name: Anonymous 2011-08-06 3:26

bomp

Name: Anonymous 2011-08-06 5:16

>>1
replace in all the leafs with the minimum value in one pass, instead of 2
Disregard that C/C++ can do 2 passes faster than Haskell does 1 pass.

Don't change these.
Name: Email:
Entire Thread Thread List