Re: are there implementation reasons for not providing a break statement in an imperative language?

"robin" <robin51@dodo.com.au>
Fri, 11 Mar 2011 21:51:00 +1100

          From comp.compilers

Related articles
[9 earlier articles]
Re: are there implementation reasons for not providing a break stateme richard@cogsci.ed.ac.uk (2011-01-19)
Re: are there implementation reasons for not providing a break stateme bc@freeuk.com (Bartc) (2011-01-20)
Re: are there implementation reasons for not providing a break stateme pdjpurchase@googlemail.com (1Z) (2011-02-13)
Re: are there implementation reasons for not providing a break stateme thomas.mertes@gmx.at (tm) (2011-02-17)
Re: are there implementation reasons for not providing a break stateme idbaxter@semdesigns.com (Ira Baxter) (2011-03-07)
Re: are there implementation reasons for not providing a break stateme gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-03-08)
Re: are there implementation reasons for not providing a break stateme robin51@dodo.com.au (robin) (2011-03-11)
| List of all articles for this month |
From: "robin" <robin51@dodo.com.au>
Newsgroups: comp.compilers
Date: Fri, 11 Mar 2011 21:51:00 +1100
Organization: Compilers Central
References: 11-01-043 11-02-011 11-03-028
Keywords: syntax, design, comment
Posted-Date: 11 Mar 2011 09:00:31 EST

From: Ira Baxter <idbaxter@semdesigns.com>
>The C break statement is infamous for causing the
>Northeast Blackout some 20(?) years ago, when some bright soul wrapped
>the construct containg the break inside another block, and thus the
>break went to to wrong ("innermost containing") block exit.


That was not a good choice of HLL to control real-time applications.


A fail-safe language such as PL/I should have been used for that
purpose. It has facilities for recovering and continuing from
unexpected situations (errors, unexpected outcomes).


C, on the other hand, when it encounters a problem, crashes.


Incidentally, C has a weak case structure. That of PL/I and other
HLLs isolates each choice within a compartment, without the risk of
accidentally falling through into the code of another case.
[C doesn't just "crash", but I agree it's a challenge to write robust
code. Unless people have something to say on this topic relevant
to compilers, I'm declaring it over. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.