[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finally clauses

This page is part of the web mail archives of SRFI 34 from before July 7th, 2015. The new archives for SRFI 34 contain all messages, not just those from before July 7th, 2015.



Hi. One feature I find valuable in Java that I miss in C++ (and
Scheme, for that matter) is the idea of a "finally" clause. Would
srfi-34 be a sensible place to put one of these - either alongside the
try clause, on its own, or bound up together with it, as perhaps
try/finally?

	(begin
	  (mutex-lock! m)
	  (finally (mutex-unlock! m)
	    (do-operation-requiring-lock)))

Tony