From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 14:31:32 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 4B60C16A429 for ; Fri, 24 Jun 2005 14:31:32 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: from mailserv1.neuroflux.com (ns2.neuroflux.com [204.228.228.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C40B343D1F for ; Fri, 24 Jun 2005 14:31:31 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 6177 invoked by uid 89); 24 Jun 2005 14:34:13 -0000 Received: from unknown (HELO www2.neuroflux.com) (127.0.0.1) by localhost with SMTP; 24 Jun 2005 14:34:13 -0000 Received: from 66.166.104.222 (SquirrelMail authenticated user ryans@gamersimpact.com); by www2.neuroflux.com with HTTP; Fri, 24 Jun 2005 08:34:13 -0600 (MDT) Message-ID: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> Date: Fri, 24 Jun 2005 08:34:13 -0600 (MDT) From: "Ryan Sommers" To: hackers@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Subject: 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 14:31:32 -0000 Greetings all... I'm about to undertake a major software engineering project and I can't decide between C or C++ and was wondering if I could get some input from the community. As part of this project I'm going to need to make use of at least 2 C libraries (OpenSSL and ncurses) and the application must be compatible with the standard range of Linux/UNIX compilers and operating systems. All of these signs make me sway closer to just doing it in C. However, one strong point always seems to pull me back to C++, constructors and destructors. Constructors and destructors can offer so much in the way of memory leak avoidance. Of course, each language can leak memory like a sieve if used improperly. However, for statically allocated structures semi-automatic garbage collection can be a nice cushion. 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... PS For this project things like polymorphisms and inheritance really aren't needed. Thanks -- Ryan Sommers ryans@gamersimpact.com