About switch case statements...
Denis Koroskin
2korden at gmail.com
Mon Nov 16 01:16:33 PST 2009
On Mon, 16 Nov 2009 11:58:44 +0300, MIURA Masahiro <echochamber at gmail.com>
wrote:
> On 11/16/2009 02:49 AM, Chad J wrote:
>> So, switch-case statements are a frequent source of nasty bugs. Fixing
>> them (well) requires breaking backwards compatibility.
>>
>> Any chance this will happen for D2?
>
> If I remember correctly, one of D's design policies is
> that a D code that looks like C code should behave like C.
> Are we giving up that policy?
Correction: either behave like C, or raise a compile-time error.
Missing break statement will not cause a different behavior. It will fail
to compile.
More information about the Digitalmars-d
mailing list