Article View: comp.sys.mac.oop.macapp3
Article #335Re: C++ (was re: bedrock defection
From: BoBolicious
Date: Sun, 24 Jan 1993 22:19
Date: Sun, 24 Jan 1993 22:19
38 lines
2783 bytes
2783 bytes
In article <727841301.8123714@AppleLink.Apple.COM> ALANDAIL@AppleLink.Apple.COM (Personal Software, Alan Dail,PRT) writes: >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++. MPW C++ will warn you if you use a "=" inside an if. 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. >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. Do you have any more examples? I've found C++ to be an ideal mix of flexible elegance & stiff type-checking. The biggest gotcha for me is usually a bad typecast, which if I understand correctly, Pascal allows as well. Properly written C++ code can pretty stable; it took many shots-to-the-foot, for instance, before I was fully convinced that initializing everything to nil and then checking everything before using it is truly The Way (tm). cheers, bobo In seeking the unattainable, bowman@reed.edu simplicity only gets in the way. Best personal ad ever: "Functionally dysfunctional bi-polar former pop-star geek with Valium habit seeks anorexic queen of darkness for co-dependency. Hobbies include: passing out, slurred speech, blurred vision and reliving past glory." _Willamette Week_, 1/7-13/93
Technical Details
Message-ID:
<1993Jan24.221920.13361@reed.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!uwm.edu!ogicse!reed!bowmanReferences:
<727841301.8123714@AppleLink.Apple.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!uwm.edu!ogicse!reed!bowman From: bowman@reed.edu (BoBolicious) Newsgroups: comp.sys.mac.oop.macapp3 Subject: Re: C++ (was re: bedrock defection Message-ID: <1993Jan24.221920.13361@reed.edu> Date: 24 Jan 93 22:19:20 GMT Article-I.D.: reed.1993Jan24.221920.13361 References: <727841301.8123714@AppleLink.Apple.COM> Organization: Reed College, Portland, OR Lines: 38