Remove switch case fallthrough

Imperatorn johan_forsberg_86 at hotmail.com
Thu May 13 16:51:07 UTC 2021


On Thursday, 13 May 2021 at 14:25:53 UTC, rempas wrote:
> On Thursday, 13 May 2021 at 14:12:40 UTC, Ola Fosheim Grøstad 
> wrote:
>> On Thursday, 13 May 2021 at 13:55:10 UTC, IGotD- wrote:
>>> In practice this is possible by just add another keyword. 
>>> Something like "switch2", "switchb", can't really come up 
>>> with good name. Then you just have a switch with break as 
>>> default. What I have against it is that a new type of bugs 
>>> will occur where the programmers accidentally mix up the two.
>>
>> Just use a different keyword than "case"? Like "when"?
>
> Exactly! We can mix things up a little! Or even add a new 
> statement called "match" idk

Please don't add *more* to the language. Just remove fallthrough. 
Done.


More information about the Digitalmars-d mailing list