On Sunday, March 27, 2011 6:17:59 AM UTC-4, Stefan Sigurdsson wrote:
>
> How do you guys normally manage resources when using lazy sequences?
>
>
You have to manage resources at a larger scope that encompasses all your use 
of the lazy sequence.  The quick-and-dirty solution is to use `doall` inside 
`with-open`.  The more refined solution is to have a resource manager that 
controls when resources get cleaned up.  This has been discussed as a 
possible language feature called "scopes."  After countless discussions, no 
one on the Clojure/core team has been able to come up with a comprehensive 
description of what scopes are, much less how to implement them.

-Stuart Sierra
clojure.com

-- 
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

Reply via email to