home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / oop / macapp3 / 603 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.7 KB

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!olivea!apple!applelink.apple.com
  2. From: ALANDAIL@AppleLink.Apple.COM (Personal Software, Alan Dail,PRT)
  3. Newsgroups: comp.sys.mac.oop.macapp3
  4. Subject: Re2: C++ (was re: bedrock defe
  5. Message-ID: <727975846.1197764@AppleLink.Apple.COM>
  6. Date: 25 Jan 93 15:22:00 GMT
  7. Sender: daemon@Apple.COM
  8. Organization: AppleLink Gateway
  9. Lines: 28
  10.  
  11. >MPW C++ will warn you if you use a "=" inside an if.
  12. I was unaware of this warning.  Is this a warning that is defined by C++
  13. (meaning all valid C++ compilers will generate it), or something that is added
  14. to the MPW compiler (or CFront) to alert you of a condition that is valid in
  15. C++, but may cause trouble.  If this is part of the language, then it is a
  16. little better than I thought.
  17.  
  18. >The biggest problem I had switching from C to C++ was that I didn't pay enough
  19. >attention to the warnings that CFront emits.  My C code was so "warning-laden"
  20. >that I tended to just ignore them, but CFront can be quite helpful.  It could
  21. >be better, though, I admit.
  22.  
  23. The C++ wanrning system has at least 2 problems:
  24.     So many meaningless warnings are generated, it is easy to be lulled into
  25. ignoring them all together (until something goes wrong).
  26.     Some of the conditions that are warning should really be errors.  For
  27. example, the warning "temporary used for non-const xxxxx & argument".  This
  28. tells you that your method is being called, but the results are being
  29. discarded.   I can't imagine why this would be allowed.
  30.  
  31. I still feel that C++ is more complex than it needs to be.  (Perhaps this is
  32. due to it's roots in C.)  I believe that as our hardware gets more powerful,
  33. our tools should be getting more elegant, not more complex.  Compare SmallTalk
  34. to C++.
  35.  
  36. Alan
  37.  
  38.  
  39.