home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13065 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  2.2 KB

  1. 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
  2. From: bevan@cs.man.ac.uk (Stephen J Bevan)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: named loops
  5. Message-ID: <BEVAN.92Aug29180936@tiger.cs.man.ac.uk>
  6. Date: 29 Aug 92 17:09:36 GMT
  7. References: <aldavi01.714376080@starbase.spd.louisville.edu>
  8.     <1992Aug21.143653.10805@alias.com> <1992Aug22.171535.29638@taumet.com>
  9.     <BEVAN.92Aug23144650@tiger.cs.man.ac.uk>
  10.     <1992Aug24.161012.2835@taumet.com>
  11. Sender: news@cs.man.ac.uk
  12. Organization: Department of Computer Science, University of Manchester
  13. Lines: 31
  14. In-reply-to: steve@taumet.com's message of 24 Aug 92 16:10:12 GMT
  15.  
  16. In article <1992Aug24.161012.2835@taumet.com> steve@taumet.com (Steve Clamage) writes:
  17.    As Bjarne Stroustrup has pointed out many times, there are lots of
  18.    proposals for lots of nice features to be added to C++.  Any one
  19.    feature considered alone might be easy to implement, break no existing
  20.    code, and provide some convenience for some number of programmers.
  21.    If all such were adopted, the language would become so complicated
  22.    that the language and its compilers would collapse under their own
  23.    own weight.  (Some might say this has already happened :-) .)
  24.  
  25. This "some" does.
  26.  
  27.  
  28.    Second (a bit of nit-picking), the current "break" does not require a
  29.    label, whereas "goto" does.  The proposed change adds a label to
  30.    the main code and thus also to the "break".  This seems to me quite
  31.    similar syntactically to the "goto", as shown in the example above.
  32.    The difference is the location of the label and whether there is a
  33.    colon following it.  For better diagnostics in the presence of syntax
  34.    errors and for consistency, it could be argued that the loop label
  35.    should have a colon anyway.
  36.  
  37. I'm not sure what point the above was trying to make.  Anyway, 
  38. given that keyword overloading is the norm in C, I'm suprised there
  39. even is a "break" statement.  In true minimalist style, I would have
  40. expected to have "goto" with no label to mean "exit this block".
  41. Of course this doesn't handle "continue", but then I've never found a
  42. use for it, so it can go the way of "entry".
  43.  
  44. bevan
  45.  
  46. PS I don't take C++ seriously, so don't take this article seriously either.
  47.