home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!kithrup!stanford.edu!ames!haven.umd.edu!darwin.sura.net!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!mcsun!uknet!mucs!m1!bevan
- From: bevan@cs.man.ac.uk (Stephen J Bevan)
- Newsgroups: comp.lang.c++
- Subject: Re: named loops
- Message-ID: <BEVAN.92Aug29180936@tiger.cs.man.ac.uk>
- Date: 29 Aug 92 17:09:36 GMT
- References: <aldavi01.714376080@starbase.spd.louisville.edu>
- <1992Aug21.143653.10805@alias.com> <1992Aug22.171535.29638@taumet.com>
- <BEVAN.92Aug23144650@tiger.cs.man.ac.uk>
- <1992Aug24.161012.2835@taumet.com>
- Sender: news@cs.man.ac.uk
- Organization: Department of Computer Science, University of Manchester
- Lines: 31
- In-reply-to: steve@taumet.com's message of 24 Aug 92 16:10:12 GMT
-
- In article <1992Aug24.161012.2835@taumet.com> steve@taumet.com (Steve Clamage) writes:
- As Bjarne Stroustrup has pointed out many times, there are lots of
- proposals for lots of nice features to be added to C++. Any one
- feature considered alone might be easy to implement, break no existing
- code, and provide some convenience for some number of programmers.
- If all such were adopted, the language would become so complicated
- that the language and its compilers would collapse under their own
- own weight. (Some might say this has already happened :-) .)
-
- This "some" does.
-
-
- Second (a bit of nit-picking), the current "break" does not require a
- label, whereas "goto" does. The proposed change adds a label to
- the main code and thus also to the "break". This seems to me quite
- similar syntactically to the "goto", as shown in the example above.
- The difference is the location of the label and whether there is a
- colon following it. For better diagnostics in the presence of syntax
- errors and for consistency, it could be argued that the loop label
- should have a colon anyway.
-
- I'm not sure what point the above was trying to make. Anyway,
- given that keyword overloading is the norm in C, I'm suprised there
- even is a "break" statement. In true minimalist style, I would have
- expected to have "goto" with no label to mean "exit this block".
- Of course this doesn't handle "continue", but then I've never found a
- use for it, so it can go the way of "entry".
-
- bevan
-
- PS I don't take C++ seriously, so don't take this article seriously either.
-