2 ms·
Other posts have already mentioned that specific macros of this form exist in several Lisps. I've seen more than one macro-writing guide that talks about the wi
by Zak 15y ago
Other posts have already mentioned that specific macros of this form exist in several Lisps. I've seen more than one macro-writing guide that talks about the with-something macro pattern for managing resources, and I've seen it applied in libraries that provide macros like with-database and with-query-results.
CL and Clojure could easily support a generic with macro requiring that there be an open and close method for the resource in question.