From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 16:14:47 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F0BD16A41C for ; Fri, 24 Jun 2005 16:14:47 +0000 (GMT) (envelope-from cmello@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8D0243D1F for ; Fri, 24 Jun 2005 16:14:46 +0000 (GMT) (envelope-from cmello@gmail.com) Received: by wproxy.gmail.com with SMTP id 68so1319435wri for ; Fri, 24 Jun 2005 09:14:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=fDt1kJRlGz9xgJ7eXjhX9xHJoS0669WZ67JdJcAL++41h/qtgkWiGQ4C3KpOKvaoVsWkTUz69KmHu5eUQReiupYW7il5nfOUgoVSYb3O88olTA3mHCVrfkQNK9a5LiCKJLI3TuIeoXz3xMJQ8alzRRhBjo8O1tzQsrvHXXTrB5Q= Received: by 10.54.114.6 with SMTP id m6mr1936882wrc; Fri, 24 Jun 2005 09:14:45 -0700 (PDT) Received: by 10.54.102.20 with HTTP; Fri, 24 Jun 2005 09:14:45 -0700 (PDT) Message-ID: Date: Fri, 24 Jun 2005 13:14:45 -0300 From: Cesar Mello To: Erich Dollansky In-Reply-To: <42BC248D.8060206@pacific.net.sg> Mime-Version: 1.0 References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <42BC248D.8060206@pacific.net.sg> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Ryan Sommers , hackers@freebsd.org Subject: Re: To C++ or not to C++ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cesar Mello List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2005 16:14:47 -0000 Go for C++ and keep your C APIs hidden.=20 Automatic resource acquisition, the standard template library and exceptio= n=20 handling work great and will allow you to write very clean code. If you haven't done this yet, buy a copy of "The C++ Programming Language"= =20 by Bjarne Stroustrup and "C++ Coding Standards" by Herb Sutter, that change= d=20 my life drastically. hehe In the other hand, if you have seen MFC, forget everything you know as C++= =20 and go buy those books. [] Mello 2005/6/24, Erich Dollansky :=20 >=20 > Hi, >=20 > Ryan Sommers wrote: > > > > Anyway, without getting into too much detail. Anyone had to make this > > choice on a project? What were your thoughts in retrospect? What would= =20 > you > > have done different, what would stay the same... > > > No matter what kind of project I did after the C++ hype was over it was > in C++ with as little as object orientation as possible just to make use > of the advantages compilers offer for C++. >=20 > You need one or more interfaces to plain C libraries. >=20 > You should see pretty fast where you better switch to C++ as long as you > keep this clear line to C libraries always intact. >=20 > You also should draw a clear line if your programs will be called from > others. Draw the same clear line between C and C++ to avoid confusion > and stick with plain C as much as possible. >=20 > Never forget, many of the object orientated principles also work with > plain C. >=20 > Erich > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >