Fork me on GitHub
#code-reviews
<
2021-09-08
>
Ben Sless13:09:40

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?

emccue17:09:09

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

emccue17:09:27

idk what the best behavior is though

emccue17:09:50

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

Ben Sless17:09:21

Why not?

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

emccue17:09:51

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

emccue17:09:02

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

Ben Sless19:09:04

which is probably wrong :thinking_face: