From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11764 invoked by alias); 30 Jul 2008 11:55:06 -0000 Received: (qmail 11752 invoked by uid 22791); 30 Jul 2008 11:55:05 -0000 X-Spam-Check-By: sourceware.org Received: from hoat.troll.no (HELO hoat.troll.no) (62.70.27.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jul 2008 11:54:39 +0000 Received: from hoat.troll.no (tedur.troll.no [62.70.27.154]) by hoat.troll.no (Postfix) with SMTP id 4AD2D20540 for ; Wed, 30 Jul 2008 13:54:36 +0200 (CEST) Received: from gar.trolltech.de (gar.trolltech.de [10.4.0.24]) by hoat.troll.no (Postfix) with ESMTP id 32CEC20538 for ; Wed, 30 Jul 2008 13:54:36 +0200 (CEST) From: =?iso-8859-1?q?Andr=E9_P=F6nitz?= To: gdb@sourceware.org Subject: Re: Move GDB to C++ ? Date: Wed, 30 Jul 2008 12:11:00 -0000 User-Agent: KMail/1.9.9 References: <487658F7.1090508@earthlink.net> <488F5CAA.8050902@gnu.org> In-Reply-To: <488F5CAA.8050902@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807301357.00658.apoenitz@trolltech.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00317.txt.bz2 On Tuesday 29 July 2008 20:08:42 Andrew Cagney wrote: > The question I'm asking here is are we focusing on C++ as a solution, > and mistakenly trying to rely on its features as a solution, when we > should instead be first focusing on the design, what ever the > implementation language? I've seen a few code reviews on gdb-patches pointing out improper (like missing) use, of, say, 'xfree'. Getting these right seems straightforward from a conceptional point of view, yet humans err, and there's a lot of time spent in creating such code and reviewing it. Also, it adds a certain level of "line noise" to the code making it at least for the casual reader of the code hard to distinguish what the actual meaning of a chunk of code is, and what belongs to the "house keeping". This is one of the things C++ or (- better also in my opinion -) "C with classes" can solve. Destructors are friends. So, yes, C++ can help to solve proble like the problem of limited developer resources. It also can help to lower the entrance barrier, as less project specific maintanance processes need to be learned when less "maintanance" code is needed. Less time might be spent on reading (the then un-needed) maintanance code, too. Note that I said "can", not "will". Whether it will depends on the kind of code that is accepted. Clearly, C++ _can_ be abused. It does not have to, though, and I have still to see a project in that limbo between C and C++ that did not gain from going at least to "C with classes".... Not sure this was helpful for anyone, but I simply could not resist ;-} Andre' PS: Incidentally, I came across the discussion because I was looking for a place to ask a few "gdb user questions". The list descriptions at http://sourceware.org/gdb/mailing-lists/ all seem to be a bit development-centric. Would this list here be ok nevertheless?