On 08.01.2009, at 11:22, Mark Engelberg wrote: > So my blog post has a dual purpose. First, I explain the "gotcha" > that Stuart and I discussed. Second, I report back to the community > about the actual experience I had in the past month, exploring > laziness in Clojure. I decided to blog it rather than post it here > primarily due to its length.
An interesting analysis. Looking my own applications, I tend to agree with your observations, but then I also have a similar code base as you have: almost all of it is purely functional code using Clojure's basic data structures. I also agree with your conclusion that the critical point is lazy sequences whose constructors are not referentially transparent. I wonder if there is any way to have them detected reliably (at compile time or at run time), but I expect this can't be done. Another solution would be to detect lazy sequences guaranteed to be purely functional because of the exclusive use of safe functions, and make them uncached by default. That should be doable but perhaps with an unreasonable effort or a high runtime penalty. 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 -~----------~----~----~----~------~----~------~--~---