Is there ANY chance we can fix the bitwise operator precedence rules?
Justin Spahr-Summers
Justin.SpahrSummers at gmail.com
Fri Jun 18 20:29:44 PDT 2010
On Fri, 18 Jun 2010 20:17:09 -0700, Jonathan M Davis
<jmdavisProg at gmail.com> wrote:
> >> I, for one, _want_ case statements to be able to fall through. It would
> >> be horribly painful in many cases if they couldn't. Now, requiring a
> >> separate statement like fallthrough or somesuch instead of break might
> >> not be a bad idea, but requiring that each case end with a break would
> >> seriously restrict the usefulness of switch statements.
> >
> > I agree. But the basic idea is to do extra work if you're doing
> > something unusual, and falling through is unusual.
>
> Certainly a good principle and one that D holds to for the most part -
> certainly far better than many other languages.
>
Follow the principle too much, though, and you end up in the Ruby (more
specifically, Rails) camp. It's amazing when you don't need to do
something unusual, but *man* have I had problems trying to do what I
want with Rails.
That said, having used C for a significant period of time, I'm well
aware of the fall-through semantics and use it from time to time, but I
wouldn't be opposed to removing implicit fall-through from the language.
Fall-through doesn't strike me as a big issue in and of itself, but
dogmatic languages aren't fun to work with either.
More information about the Digitalmars-d
mailing list