home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!apple!applelink.apple.com
- From: ALANDAIL@AppleLink.Apple.COM (Personal Software, Alan Dail,PRT)
- Newsgroups: comp.sys.mac.oop.macapp3
- Subject: C++ (was re: bedrock defection
- Message-ID: <727841301.8123714@AppleLink.Apple.COM>
- Date: 24 Jan 93 01:50:00 GMT
- Sender: daemon@Apple.COM
- Organization: AppleLink Gateway
- Lines: 23
-
- Larry,
-
- >...as safe as Pascal.... MPW C++ may not catch as many errors as it should,
- >but that's a compiler problem, not a language problem.
-
- I would tend to disagree. C and C++ both allow so many things to compile that
- could easily be typos but cause the program to do the wrong thing (I do admit
- that C++ is better than C). For example, anywhere you can use a ==, you can
- also use = (and vice versa) and have the program compile fine (due to the
- definition of the language), but get different results. Your program will not
- only compile, but may even work fine in some instances. It doesn't even stand
- out when you are looking over your code. This error would be cought in Pascal
- (or even in Pascal '9x), but not in C or C++.
-
- There are other many other problems like this that are part of the language and
- not due to the compiler. This doesn't even address the other language problems
- like having various features clash when used together or having the wrong
- defaults when using features (why isn't virtual the default?). It's a shame
- that Apple doesn't appear to be doing anything with Pascal '9x which appears to
- give programmers the power of C++ without nearly as many pitfalls.
-
- Alan
-
-