Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!purdue!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c++ Subject: Re: C++ as a better C (fact or fiction)? Message-ID: <509@goofy.megatest.UUCP> Date: 5 May 88 03:25:14 GMT References: <6590041@hplsla.HP.COM> Organization: Megatest Corporation, San Jose, Ca Lines: 35 in article <6590041@hplsla.HP.COM>, bobk@hplsla.HP.COM ( Bob Kunz) says: > > > I recently attended the AT&T training on C++ and an interesting question > came up in one of the discussions about the use of C++ "simply as a > better C". The opinions ranged from only use C++ if you intend to use > all it's features to it's fine to use as a better C because it has type > checking and one can choose to use the other features if one wants to. > > 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? > Since I do my C programming in the object-style, for me there is no conflict. C++ makes it easier to program the way I would anyhow. Once you've heard of object-programming and understood it, why would you want to program any other way? :-) But here's another "better C" reason: You can redefine operators. So if somebody gets "programmed into a corner" with direct accesses to a data-structure all over the place (no doubt in old code written by somebody who panicked an ran long ago) you can fight your way out. -- Dave J.