@jamie_allen e.g. think about the trivial lazy value in Java: final x = new Lazy { deref() { return doComputation(); }();
-
-
Replying to @jamie_allen
@jamie_allen That's a delay implementation, but it could be transformed into a promise in a few ways.1 reply 0 retweets 0 likes -
Replying to @jamie_allen
@jamie_allen in Clojure you'd use clojure.lang.IDeref which is a little more generic and has optional timeouts, but its not strictly reqd.2 replies 0 retweets 0 likes -
Replying to @jamie_allen
@jamie_allen you really shouldn't have to, the java is pretty straightforward.1 reply 0 retweets 0 likes -
Replying to @aphyr
@jamie_allen eg here's clojure's delay: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Delay.java … and atom: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Atom.java …3 replies 0 retweets 0 likes -
Replying to @jamie_allen
@jamie_allen I disagree. You only need mutable state If you, you know, want mutation, e.g. memorization. Laziness doesn't require mutation.3 replies 0 retweets 0 likes
@aphyr @jamie_allen I will say that I normally associate lazy values with memoization. eg I wouldn't call Scala's call-by-name params lazy.
-
-
Replying to @tixxit
@aphyr@jamie_allen I'm not saying I'm correct, but perhaps you too have different ideas of what "laziness" is in your head.2 replies 0 retweets 0 likes -
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.