Is there ANY chance we can fix the bitwise operator precedence rules?
Jonathan M Davis
jmdavisProg at gmail.com
Mon Jun 21 16:56:51 PDT 2010
Andrei Alexandrescu wrote:
[snip]
>
>
> Andrei
Well, "goto case" and "goto case XXX" both already exist. Both get the job
done. So, regardless of which would be better for fallthrough, we can choose
to use whichever we want in our code. As it stands, it becomes a matter of
preference. I'd love something like "continue switch" or "fallthrough" to
indicate explicit fallthrough, but it isn't at all necessary, so it's not
worth trying to get Walter to add anything like that.
At this point, if Walter makes it so that case blocks must end with a flow
control statement of some kind, we're free to use either "goto case" or
"goto case XXX" for fallthrough, so unless "goto case" is so bad that we
should try to get Walter to get rid of it, I don't think that it's really an
issue. We can use whichever one we want and not worry about it. The language
is complete enough to require case statements to end with a control
statement without losing any flexibility, so I think that we can agree to
disagree on which statement is better and/or clearer and try and get Walter
to add the compiler error for naked fallthrough.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list