code-reviews

Ben Sless 2021-09-08T13:16:40.019200Z

Remind me in a few hours if I forget, I played around with Loom and tried to figure out the ergonomic interface with it in Clojure. I'll upload on github Is it the intent of the designers for the programmer to use only one Continuation Scope?

emccue 2021-09-08T17:30:09.019600Z

yeah that is odd because when the iterator is done you might not have actually reached the end

emccue 2021-09-08T17:30:27.019800Z

idk what the best behavior is though

emccue 2021-09-08T17:30:50.020Z

i think this is partially why python uses StopIteration instead of hasNext

Ben Sless 2021-09-08T17:32:21.020200Z

Why not?

public boolean hasNext() {
                return !cont.isDone();
            }

emccue 2021-09-08T17:45:51.020400Z

(println "A")
(yield 1)
(println "B")

emccue 2021-09-08T17:46:02.020600Z

you will print a, have 1 ready to go, continuation won't be finished. What is the value of next() after that?

Ben Sless 2021-09-08T19:53:19.020900Z

nil

Ben Sless 2021-09-08T19:56:04.021100Z

which is probably wrong 🤔