On Tue, 11 May 2010 22:18:29 +0200, Don wrote:
> void foo(bool x)
> {
> if (x)
> scope(exit) writeln("exiting");
> writeln("body");
> }
Doesn't this do what you want, without changing the language?
void foo(bool x) {
scope(exit) {
if (x) writeln("exiting");
}
// ...
}
Best,
Graham