[swift-evolution] Better syntax for deferred?

Tino Heth 2th at gmx.de
Sat Jan 2 08:37:23 CST 2016

> Unless I missed something obvious, wouldn't placing "code that always has to run at the end" actually *at the end* not make more sense? Like this…
In most cases, you use defer for cleanup tasks - so it make more sense to keep it at the source of the "problem":

file.open(); defer { file.close() }


More information about the swift-evolution mailing list