I just saw this on the JavaWorld article (great article by the way: http://www.javaworld.com/javaworld/jw-05-2009/jw-05-clojure.html ) <http://www.javaworld.com/javaworld/jw-05-2009/jw-05-clojure.html>
(defmacro with-open [bindings & body] `(let bindings (try @body (finally (.close (first bindings)))))) ...really? Is there some reason it only closes the first of the bindings vector? It's not at all uncommon (though i wouldn't call it common either) in C# to do: using ((IMyFoo foo = GetMyDisposableFoo()) (IMyBar bar = GetMyDisposableBar())){ ...blah blah blah } It seems like this idiom would be easy to implement in this macro. Or am I missing something? --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---