From owner-freebsd-questions@FreeBSD.ORG Wed Nov 12 02:58:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56AE116A4CE for ; Wed, 12 Nov 2003 02:58:54 -0800 (PST) Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55AB643FA3 for ; Wed, 12 Nov 2003 02:58:53 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Wed, 12 Nov 2003 10:58:01 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 1AJseX-0003OX-00; Wed, 12 Nov 2003 10:55:13 +0000 Date: Wed, 12 Nov 2003 10:55:12 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: Alex Kelly In-Reply-To: <002c01c3a8c1$a4651bb0$6400a8c0@desktop> Message-ID: References: <002c01c3a8c1$a4651bb0$6400a8c0@desktop> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Jan Grant cc: freebsd-questions Subject: Re: Newbie: The C / C++ Issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 10:58:54 -0000 On Tue, 11 Nov 2003, Alex Kelly wrote: > 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? That's unlikely. The two languages are likely to coexist for quite some time. > If so, should I learn C++ and forget C? Opinions, as you'll have figured by now, differ. C++ is a large language; it has something akin to C ("a better C") as a subset. In that regard, it can be convenient to use C++ as exactly that - a better C. However, many of the improvements to that language subset have filtered back into the C standard, so the advantages there are less clear. The real issue with learning C++ is finding a decent textbook! C++ can actually be a very handy "scripting" langauge - that is, it is well-provided with pretty high-level libraries* and just writing code that ties those together is a pleasant experience. C is a lower-level nuts and bolts language. Proficiency with C means that understanding some of the "under the hood" aspects of C++ such as the nuances of object layout can be simpler. It all comes down to what exactly you want to do. If it's just the odd command-line script you might find that the convenience of the standard library of C++ makes it worthwhile learning the bits of C++ you need. jan PS. As a first text, I would generally advise people to avoid KnR. * standard and boost.org -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ They modified their trousers secretly.