home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13386 < prev    next >
Encoding:
Text File  |  1992-09-08  |  2.4 KB  |  49 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!gumby!destroyer!terminator!potts
  3. From: potts@itl.itd.umich.edu (Paul Potts)
  4. Subject: Re: GOTO, was: Tiny proposal for na
  5. Message-ID: <1992Sep8.134501.9894@terminator.cc.umich.edu>
  6. Sender: news@terminator.cc.umich.edu (Usenet Owner)
  7. Organization: Instructional Technology Laboratory, University of Michigan
  8. References: <1992Aug27.181013.29933@spss.com> <rmartin.715102882@thor> <1992Aug31.170908.13389@us-es.sel.de>
  9. Date: Tue, 8 Sep 1992 13:45:01 GMT
  10. Lines: 37
  11.  
  12. In article <1992Aug31.170908.13389@us-es.sel.de> kanze@us-es.sel.de (James Kanze) writes:
  13. >...
  14. >
  15. >Apparently most of the responses have been in favor of using break.  Do I
  16. >conclude that most programmers just don't care about having correct programs?
  17.  
  18. I have been to several talks on the formal verification of programs - it
  19. still strikes me that for anything more complex than a basic academic
  20. exercise, it is pointless to attempt such a thing. I agree that it is in
  21. principle a good idea, expecially, for example, in software used in medical
  22. devices where an error can be life-threatening. But I am writing code that
  23. runs under DOS on some arbitrary system, using a class library I didn't write -
  24. what possible concern could I have for formally verifying my program?
  25.  
  26. I try to make my code as legible as possible, and try to keep the structure
  27. as simple as is practicable; I examine my loop invariants, attempt to test
  28. with a range of possible values, check error codes, and while debugging use
  29. "assert" tests;  but I also will use GOTO on those occasions when it can
  30. enhance my code, and break. I'm not writing a textbook, I'm writing a program,
  31. and the real world isn't so ideal as to allow me to argue that my program
  32. is formally correct (other than letting me mention in passing that the
  33. compiler doesn't seem to complain).
  34.  
  35. One man's opinion... can we put this debate to bed soon?
  36.  
  37. >--
  38. >James Kanze                            GABI Software, Sarl.
  39. >email: kanze@us-es.sel.de              8 rue du Faisan
  40. >                                       67000 Strasbourg
  41. >                                       France
  42.  
  43.  
  44. -- 
  45. "...remove protective cap. Hold atomizer with thumb at base and nozzle 
  46. between first and second fingers. Without tilting head, insert nozzle into 
  47. nostril. Fully depress rim with a firm, even stroke and sniff deeply."
  48. -advice for presidential candidates from Paul Potts - potts@itl.itd.umich.edu
  49.