Fork me on GitHub
#clojure-dev
<
2018-03-31
>
matan09:03:42

speaking of clojure and JVM, is laziness rooted in the JVM or shoehorned on top of it by clojure? I think the former but not sure.

matan09:03:52

Any plans for introducing (more/better) compiler optimizations in 1.10?

bronsa12:03:54

the jvm has no concept of laziness

bronsa12:03:22

nor does clojure really, clojure has a concept of lazily produced sequences, not about lazy evaluation

tbaldridge14:03:40

@matan I like to think of laziness in Clojure as the natural outcome of abstracting the lisp cons cell. Most cons cells are of two fields: head, tail. What if tail was a function that produced the tail? If that was done, we'd probably want to memoize and restrict multi-threaded access to the function so that we don't re-run it every time some one asked for the tail. And that's about all there is to laziness in Clojure.