D vs C++

spir denis.spir at gmail.com
Sat Dec 25 16:36:14 PST 2010


On Sat, 25 Dec 2010 14:03:42 -0800
Walter Bright <newshound2 at digitalmars.com> wrote:

> bearophile wrote:
> > Structured programming is good because it usually helps code readability. But
> > it's not Verb, so in some less common cases a goto, break or continue help
> > improve the code.
> > 
> > Misra C Rules totally forbid break and continue, but more human coding
> > guidelines just suggest to avoid them when possible, they are not evil.
> 
> 
> I thought the idea that break and continue were bad died about 25 years ago. 
> Pascal didn't allow them, and pretty much everyone hated the workaround of 
> having to use flag variables.

Sure, they're both equivalent to a goto. But what they mean makes sense, and it's clear. As you say, workarounds have always been ugly. For me, _that_ is important.

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d mailing list