to the try construct. No matter how control leaves the try the code inside the finally clause is guaranteed to execute. This is useful when writing code that must relinquish an expensive resource (such as an opened file or a database connection) when finished processing: FileStream stm = null; // C# example try { stm = new FileStream("logfile.txt", FileMode.Create); return ProcessStuff(stm); // may throw an exception } finally { if (stm != null) stm.Close(); } Since this pattern is fairly common, C# has a special syntax: using (var stm = new FileStream("logfile.txt", FileMode.Create)) { return ProcessStuff(stm); // may throw an exception } Upon leaving the using-block, the compiler guarantees that the stm object is released, effectively binding the variable to the file stream while abstracting from the side effects of initializing and releasing the file. Python's with statement and Ruby's block argument to File.open are used to similar effect. All the languages mentioned above define standard exceptions and the circumstances under which they are thrown. Users can throw exceptions of their own; in fact C++ allows users to throw and catch almost any type, including basic types like int, whereas other languages like Java aren't as permissive. Continuations Async C# 5.0 introduced the async keyword for supporting asynchronous I/O in a "direct style". Generators Generators, also known as semicoroutines, allow control to be yielded to a consumer method temporarily, typically using a keyword (yield description) . Like the async keyword, this supports programming in a "direct style". Coroutines Coroutines are functions that can yield control to each other - a form of co-operative multitasking without threads. Coroutines can be implemented as a library if the programming language provides either continuations or generators - so the distinction between coroutines and generators in practice is a technical detail. Non-local control flow cross reference Proposed control structures In a spoof Datamation article in 1973, R. Lawrence Clark suggested that the GOTO statement could be replaced by the COMEFROM statement, and provides some entertaining examples. COMEFROM was implemented in one esoteric programming language named INTERCAL. Donald Knuth's 1974 article "Structured Programming with go to Statements", identifies two situations which were not covered by the control structures listed above, and gave examples of control structures which could handle these situations. Despite their utility, these constructs have not yet found their way into mainstream programming languages. Loop with test in the middle The following was proposed