From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5838 invoked by alias); 29 Jul 2008 16:52:13 -0000 Received: (qmail 5828 invoked by uid 22791); 29 Jul 2008 16:52:13 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jul 2008 16:51:55 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6TGprYH022350; Tue, 29 Jul 2008 12:51:53 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6TGpqoU010237; Tue, 29 Jul 2008 12:51:52 -0400 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6TGpqO4024270; Tue, 29 Jul 2008 12:51:52 -0400 Message-ID: <488F4AA7.7060001@gnu.org> Date: Tue, 29 Jul 2008 17:29:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Mark Kettenis CC: stanshebs@earthlink.net, gdb@sourceware.org Subject: Re: Move GDB to C++ ? References: <487658F7.1090508@earthlink.net> <200807101901.m6AJ1UMQ007185@brahms.sibelius.xs4all.nl> In-Reply-To: <200807101901.m6AJ1UMQ007185@brahms.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00300.txt.bz2 Mark Kettenis wrote: >> Date: Thu, 10 Jul 2008 11:46:15 -0700 >> From: Stan Shebs >> >> As many know, there is a project afoot to investigate the recoding of >> GCC from C into C++. I believe the C++ idea was briefly touched on for >> GDB at the summit, although I don't remember much discussion. Anyway, >> this would be a good time to start thinking about it, and if people are >> generally in favor of the idea, we can start small by tweaking the >> sources to be C++-friendly, avoiding keywords and so forth; GCC has a >> new warning flag -Wcxx-compat that can help. >> > > I think this is an absolutely retarded idea. C++ is a horrible > programming language. > Mark, I appreciate your pain here - as some would put it "C++ is the answer, now what was the question? :-)" - and having considered this further, wonder if both this thread and a proposed implementation as part of the archer project are being too quick to put the C++ cart before the architectural horse :-) Instead of changing GDB to C++ and hoping the change will magically transform GDB's code base into a clean ideal design; should we instead be focused on trying to address what I suspect is the underlying motivation here - a desire to clean up and re-structure GDB's code base so that it more clearly corresponds to a more modern Object Oriented design? If we consider this as an important goal, and find a way to more smoothly facilitate this development (multi-arch, at 9 years, in my not so humble opinion, was too slow) we'll be able to improve GDB's internal architecture without using C++. Then, in time, with a clearer O-O design, we can re-consider choices such as language. Thoughts?