5 ms·
In Clojure, where lazy evaluation is also the default (although only for sequences), someone recently wrote an in-depth article about the issues caused by this
by phforms 3y ago
In Clojure, where lazy evaluation is also the default (although only for sequences), someone recently wrote an in-depth article about the issues caused by this choice: https://clojure-goes-fast.com/blog/clojures-deadly-sin/ https://clojure-goes-fast.com/blog/clojures-deadly-sin/
I haven’t read the whole article yet, but maybe it could be interesting to compare it with Haskell and see if some of the same problems occur or if Haskells compiler or overall design around (pervasive) lazyness makes it easier to work with and more performant.
- dustingetz 3y agoclojure does not have lazy evaluation of any form. “lazy sequences” are a hack, clojure core uses macros to thunkify sequence traversal in userland. this hack interacts badly with a few other aspects of clojure because clojure itself is not lazy, being that it is a hosted language designed to lightly cover the host platform (Java, JS, .NET, Dart) and maximize host ecosystem compatibility and therefore does not alter core platform semantics such as concurrency model or evaluation model.