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 |
Posted-Date: | 18 Jan 2011 00:57:56 EST |
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
Return to the
comp.compilers page.
Search the
comp.compilers archives again.