From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 15:19:50 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 9ABA816A41C for ; Fri, 24 Jun 2005 15:19:50 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: from sarajevo.pacific.net.sg (sarajevo.pacific.net.sg [203.120.90.134]) by mx1.FreeBSD.org (Postfix) with SMTP id DBE0243D48 for ; Fri, 24 Jun 2005 15:19:49 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: (qmail 21442 invoked from network); 24 Jun 2005 15:19:48 -0000 Received: from unknown (HELO maxwell6.pacific.net.sg) (203.120.90.212) by sarajevo with SMTP; 24 Jun 2005 15:19:48 -0000 Received: from [192.168.0.107] ([210.24.122.16]) by maxwell6.pacific.net.sg with ESMTP id <20050624151947.HSZJ1233.maxwell6.pacific.net.sg@[192.168.0.107]>; Fri, 24 Jun 2005 23:19:47 +0800 Message-ID: <42BC248D.8060206@pacific.net.sg> Date: Fri, 24 Jun 2005 23:19:41 +0800 From: Erich Dollansky Organization: oceanare pte ltd User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050514) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ryan Sommers References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> In-Reply-To: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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 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 15:19:50 -0000 Hi, 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 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++. You need one or more interfaces to plain C libraries. You should see pretty fast where you better switch to C++ as long as you keep this clear line to C libraries always intact. 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. Never forget, many of the object orientated principles also work with plain C. Erich