[Issue 11988] Add __switch symbol to allow retrieval of switch statement value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 25 11:28:41 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11988
--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2014-01-25 11:28:37 PST ---
(In reply to comment #3)
> Who would expect 'if' and 'switch' to have the same semantics?
Well, consistency is king. And you may introduce a bug without noticing if
during refactoring you change a switch statement into an if statement.
__switch might seem a bit obscure though from the way it looks.. If the
different semantics of "if (auto x = ..)" and "switch (auto x = ..)" isn't
really a big issue then I'm all for it.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list