Fork me on GitHub
#clojure-dev
<
2019-07-05
>
andy.fingerhut04:07:40

Does anyone know why a Clojure/Java LazySeq object has a field named sv in its implementation? It is only accessed from the methods sval and seq, and sval is only ever called from seq, and both are synchronized. It seems like sv is redundant, and s would be enough, but I am probably missing something: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LazySeq.java#L39-L63

Alex Miller (Clojure team)13:07:39

maybe it is arranged to avoid calling RT.seq() or casting in the terminator case?