Date: Tue, 11 Nov 2003 22:10:48 -0500 From: Louis LeBlanc <freebsd@keyslapper.org> To: freebsd-questions@freebsd.org Subject: Re: Newbie: The C / C++ Issue Message-ID: <20031112031048.GA7080@keyslapper.org> In-Reply-To: <002901c3a8c4$5f5e7c70$1200a8c0@gsicomp.on.ca> References: <002c01c3a8c1$a4651bb0$6400a8c0@desktop> <002901c3a8c4$5f5e7c70$1200a8c0@gsicomp.on.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/11/03 09:26 PM, Matthew Emmerton sat at the `puter and typed: > > Thanks for all of the great suggestions to my previous question! > > > > Yet, the responses have led me to another question. If C++ is > > newer and more advanced than C, will it replace C? If so, should I > > learn C++ and forget C? C++ will NEVER replace C. Not gonna happen. C compiles to much more efficient code in many cases because of the template constructs in C++. If you can avoid templates at all costs, you get very close, and only a few cases will cause slower code in C++. However, when it comes to operating systems, I suspect it will be a long time before people start using something besides C. > You can't learn C++ without learning C first. So I'd suggest you > become intimiately familiar with C, and then move on to the advanced > concepts and features that C++ provides once you want/need to use > them. I think it was established in the previous thread that this was definitely NOT the case. In fact, I learned C++ before I learned C. That isn't to say you can become a real C++ expert without learning C, so while I disagree with the statement that C is a prerequisite of C++, I agree that becoming intimately familiar with C first is a very good idea. I found the underlying basics of C much easier to grasp than C++, so learning C first might have made C++ easier. In addition, regardless of the fact that C++ is not quite a superset of C, there are still times when it will be worthwhile, usually for the sake of efficiency, to bypass the C++ standard constructs and build your own using more of a 'clean C' approach. Lou -- Louis LeBlanc leblanc@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Zymurgy's Law of Volunteer Labor: People are always available for work in the past tense.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031112031048.GA7080>