On Sunday, 6 November 2016 at 05:07:10 UTC, Andrei Alexandrescu wrote:
A more approachable thing to do is allow variable definitions in switch statements:

switch (auto x = fun() { ... }

It is surprising that doesn't work, which is a good argument in favor of the feature (removal of an undue limitation, rule of least astonishment etc).

https://issues.dlang.org/show_bug.cgi?id=11070
lol

Reply via email to