From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 24 22:39:22 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 B10A816A41C for ; Fri, 24 Jun 2005 22:39:22 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E23F43D1D for ; Fri, 24 Jun 2005 22:39:22 +0000 (GMT) (envelope-from maslanbsd@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so1175701wra for ; Fri, 24 Jun 2005 15:39:21 -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:content-transfer-encoding:content-disposition:references; b=pWAmbZVUuim6xbY6Iybs1BFBkMdZerlL950Qfdw5Q5qWV40VP+NcuYn82SDrwV2nYtsXxBPuDfGxBBLqcijhup5cebVMx9S3wcjgrYKXksvb4Z89uTKvM/+DpDAzlz78jxkHFewbLeegNXMX7kIquJoibUEce7VQjQc/UuXkmhk= Received: by 10.54.52.76 with SMTP id z76mr2129133wrz; Fri, 24 Jun 2005 15:39:21 -0700 (PDT) Received: by 10.54.102.4 with HTTP; Fri, 24 Jun 2005 15:39:21 -0700 (PDT) Message-ID: <319cceca05062415396440b9c5@mail.gmail.com> Date: Sat, 25 Jun 2005 01:39:21 +0300 From: Maslan To: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= In-Reply-To: <20050624145937.E20046@thor.farley.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2140.66.166.104.222.1119623653.squirrel@66.166.104.222> <20050624145937.E20046@thor.farley.org> 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: Maslan 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 22:39:22 -0000 i don't think this is the suitable mailling list to ask this question On 6/24/05, Se=E1n C. Farley wrote: > On Fri, 24 Jun 2005, Ryan Sommers wrote: >=20 > > 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. >=20 > If you would like to use C but want some sort of memory handling, I can > recommend using the Apache Portable Runtime (APR) in > /usr/ports/devel/apr which uses memory pools. Although I have not used > it before, there is also the Boehm Garbage Collector found in > /usr/ports/devel/boehm-gc. >=20 > Se=E1n > -- > sean-freebsd@farley.org >=20 > _______________________________________________ > 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= " >=20 >=20 --=20 I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org