Switch-case made less buggy, now with PATCH!
Don
nospam at nospam.com
Sun Nov 22 15:18:53 PST 2009
Ellery Newcomer wrote:
> On 11/22/2009 08:22 AM, Don wrote:
>>
>> You've missed the point. Andrei made a proposal for eliminating
>> accidental fallthrough bugs. It didn't involve any new syntax, and
>> changed very little existing code. Anything which violates either of
>> those things has very little chance of acceptance. You've done a patch
>> which completely ignores his proposal, and which violates both.
>>
>> The comment about the auto-generated code raises an aspect which hadn't
>> been considered in the original proposal.
>
> What was Andrei's proposal? If my memory serves (big if), he just wanted
> to disallow fallthrough and require use of 'goto case' when fallthrough
> is desired.
>
> I'm having a hard time following this discussion, but where is auto
> generated code an issue under this patch versus Andrei's proposal versus
> what we have now?
It's not.
And how does this patch change more code than Andrei's
> proposal would?
>
> I'm assuming this patch is modified to allow
>
> case 1:
> case 2:
> ...
I wasn't. Introducing case xxx!: is the problem.
More information about the Digitalmars-d
mailing list