Article View: rec.games.programmer
Article #1976Re: Should I learn C or C++ first?
From: Derick J.R. Qua-Gonzalez
Date: Wed, 16 Aug 1995 05:25
Date: Wed, 16 Aug 1995 05:25
52 lines
2486 bytes
2486 bytes
rainer@deyke3.fc.hp.com (Rainer Deyke) writes: >Robert Davies (robert.davies@vuw.ac.nz) wrote: >: Learn C++ first but spend a day or so (if you have done programming >: before) looking at a C manual to learn about the structure and layout >: of a C program. ... >#defines are still useful in C++, though not as much. True. I found from experience that they are often useful mostly to generate symbols for conditional compilation. >Casts are even more necessary in C++. C++ casts however (dynamic_cast, static_cast, const_cast and reinterpret_cast) are more explicit and safer than the C casts. A lot of casting in C++ programs usually indicate a design that has not been well thought-out ([D&E], 170). The static type checking mechanisms are very useful in my experience. >typedefs are for idiots. No, people who don't use them to clarify the meaning of code are the idiots. >structs are still used in C++ (or classes, which are basically the same >thing). C structs are a special case of classes. If you think about it, though, the purpose of the struct in C is data aggregation only. >stdio.h is still much better for i/o in C++ than the ridiculous "<<" >type i/o streams. Oh yeah. The printf function is _so_ type safe and extensible. Try adding your own types to printf, for instance. All said and done, what is your point? Best regards, DQG. -- +-----------------------------------------------------------------------------+ | Derick R. Qua-Gonzalez | ________ | | Department of High Energy Physics, California State University | \ / | | dqua@dqua.EarthLink.Net | \ / | | ``It is better to be hated for what one is, | \ / | | than loved for what one is not.'' (A. Gide) | G \/ USA| +------------------------------------------------------------------+----------+
Technical Details
Message-ID:
<dqua.808550722@dqua>Path:
arc1-ca.pugleaf.net!nntp.earthlink.net!dqua!dquaReferences:
<3v6qkj$8ak@news1.best.com> <3v713f$2bd@ixnews6.ix.netcom.com> <408rnk$auj@seagoon.newcastle.edu.au> <40etar$11n@st-james.comp.vuw.ac.nz> <40o2ee$aqp@deyke3.fc.hp.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nntp.earthlink.net!dqua!dqua From: dqua@earthlink.net (Derick J.R. Qua-Gonzalez) Newsgroups: rec.games.programmer,comp.lang.c++ Subject: Re: Should I learn C or C++ first? Date: 16 Aug 95 05:25:22 GMT Organization: Earthlink Network, Inc. Message-ID: <dqua.808550722@dqua> References: <3v6qkj$8ak@news1.best.com> <3v713f$2bd@ixnews6.ix.netcom.com> <408rnk$auj@seagoon.newcastle.edu.au> <40etar$11n@st-james.comp.vuw.ac.nz> <40o2ee$aqp@deyke3.fc.hp.com> NNTP-Posting-Host: dqua.earthlink.net