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