D allows for this type of constructs: if (auto foo = bar()) { ... } I was trying to do something similar with a while loop, but DMD seems very upset about it. Is there a reason to disallow the following? while (auto foo = bar()) { ... }