On 21.05.2009, at 01:42, Raoul Duke wrote:

> Seems like Haskell's laziness has an aura of "it will bite you
> performance-wise sooner or later." What is different (I'm asking
> didactically, not snarkily) about Clojure's laziness? Does it manage
> to avoid some aspects of the "uh ohs" in Haskell?

The main difference is that in Haskell, all evaluation is lazy,  
whereas in Clojure, only sequences are lazy by default. You can make  
your own lazy evaluation using delay, but if you do you know why you  
did it. This makes a big difference in terms of memory usage: for  
sequence processing, lazy evaluation actually helps in most cases,  
whereas elswhere its impact is difficult to estimate. In terms of CPU  
performance, lazy evaluation always entails an overhead. I can't say  
if there is an important difference between Haskell and Clojure  
implementation-wise.

Konrad.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to