Path: utzoo!mnetor!uunet!husc6!mailrus!umix!umich!mibte!gamma!ulysses!andante!alice!ark From: ark@alice.UUCP Newsgroups: comp.lang.c++ Subject: Re: C++ as a better C (fact or fiction)? Message-ID: <7853@alice.UUCP> Date: 6 May 88 20:49:04 GMT References: <6590041@hplsla.HP.COM> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 29 In article <6590041@hplsla.HP.COM>, bobk@hplsla.UUCP writes: > What's the opinion of the net? Have people used C++ as a better C and > been successful? Or do people only consider C++ when speaking object > oriented in the same breath? Does the problem need to be solvable by > object oriented techniques before C++ is considered? Why did you not > use C? And would an ANSI-C compiler have made a difference? Yes, people have used C++ as a better C and been successful. Doing so is an excellent way to get your feet wet. If you have an ANSI C compiler, it will give you many of the ``better C'' things of C++, but not all. For instance, int f(); in ANSI C means ``f is a function returning int and I haven't said anything about its arguments'' This is essential for C compatibility, but it encourages sloppy coding and suppresses type checking. The same declaration in C++ means ``f is a function returning int with no arguments'' And, of course, once you start using C++ as ``a better C'' you will find it much easier to explore the other aspects of the language.