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

Joshua Cranmer <Pidgeot18@verizon.net>
Sun, 16 Jan 2011 15:09:30 -0500

          From comp.compilers

Related articles
are there implementation reasons for not providing a break statement i noitalmost@cox.net (noitalmost) (2011-01-13)
Re: are there implementation reasons for not providing a break stateme DrDiettrich1@aol.com (Hans-Peter Diettrich) (2011-01-14)
Re: are there implementation reasons for not providing a break stateme fusionfile@gmail.com (August Karlstrom) (2011-01-14)
Re: are there implementation reasons for not providing a break stateme anton@mips.complang.tuwien.ac.at (2011-01-15)
Re: are there implementation reasons for not providing a break stateme bc@freeuk.com (BartC) (2011-01-16)
Re: are there implementation reasons for not providing a break stateme Pidgeot18@verizon.net (Joshua Cranmer) (2011-01-16)
Re: are there implementation reasons for not providing a break stateme richard@cogsci.ed.ac.uk (2011-01-18)
Re: are there implementation reasons for not providing a break stateme fusionfile@gmail.com (August Karlstrom) (2011-01-18)
Re: are there implementation reasons for not providing a break stateme fusionfile@gmail.com (August Karlstrom) (2011-01-18)
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)
[4 later articles]
| List of all articles for this month |

From: Joshua Cranmer <Pidgeot18@verizon.net>
Newsgroups: comp.compilers
Date: Sun, 16 Jan 2011 15:09:30 -0500
Organization: A noiseless patient Spider
References: 11-01-043 11-01-064
Keywords: syntax, design

On 01/16/2011 09:25 AM, BartC wrote:
> Many syntax features *are* often trivial to code, which is why it's
> surprising languages such as C-derivatives stick with the original
> crude statements (such as the C for-statement), rather than introduce
> more powerful constructs.


I think most modern C-derived languages followed Java's example and
allow labeled break/continue if they disallow universal goto. And such
features allow you to devise goto statements for anything that does not
cross scopes.


That said, there are other language constructs that I would like to see
more commonly introduced, particularly the ability to go to different
blocks if a while loop terminates early or not (think looking for an
element in an array, and doing something only if you find one).


--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth



Post a followup to this message

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