The with-open style is used a lot in the jdbc lib, and elsewhere. It's 
pretty simple when data is very small, as you can just evaluate the entire 
result with doall, etc.

How do you deal with larger data, where you need to evaluate iteratively? 
If there's only one with-open it can be reasonably simple to pass the 
consumer into that context (though from ring it's pretty convoluted, due to 
needing to pass control to ring first). But if there are multiple with-open 
you have to nest them, with a continuation passing style, or middleware 
pattern, or something, which quickly becomes onerous as it affects all the 
code surrounding the with-open.

Is there some simpler pattern?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to