From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5229 invoked by alias); 31 Jul 2008 20:00:20 -0000 Received: (qmail 3573 invoked from network); 31 Jul 2008 19:59:24 -0000 Received: from unknown (64.13.131.148) by sourceware.org with QMTP; 31 Jul 2008 19:59:24 -0000 Received: (qmail 20951 invoked by uid 10); 31 Jul 2008 19:59:23 -0000 Received: (qmail 15500 invoked by uid 500); 31 Jul 2008 19:59:17 -0000 To: Eli Zaretskii Cc: tromey@redhat.com, gdb@sources.redhat.com Subject: Re: Move GDB to C++ ? References: <487658F7.1090508@earthlink.net> <200807101901.m6AJ1UMQ007185@brahms.sibelius.xs4all.nl> <488F4AA7.7060001@gnu.org> From: Ian Lance Taylor Date: Thu, 31 Jul 2008 20:03:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Wed\, 30 Jul 2008 21\:17\:59 +0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00353.txt.bz2 Eli Zaretskii writes: >> I think much of Ian's PDF on moving GCC to C++ applies just as well to >> gdb: >> >> http://www.airs.com/ian/cxx-slides.pdf > > Those slides have only one _real_ GCC-specific argument in favor of > C++: on slide 11. All the rest is general comparison between C and > C++ based on toy examples. I think that is an unfair criticism. Every C example on those slides came directly from the gcc source code, simplified to fit on the slide. In fact, I think the simplification actually makes the C code look better than it really is, but I needed slides to show examples while I spoke, so my space was limited. I tend to think that gdb would be improved by moving to C++: I think it would make it easier to maintain the code. Many of the objections seem to take two general forms: 1) "It could get worse." That's right: it could get worse. But gdb could get worse without changing languages. The way you keep it from getting worse is by writing good code and by selecting good maintainers. Choice of language is a relatively minor factor in reducing code quality. 2) "It's too much work." Yes, it's a lot of work. If you aren't interested, don't do the work. If other people are willing to do the work, think carefully about whether you want to reject their efforts, and why. If other people are not willing to do the work, then for sure it won't happen. I'm on the gdb steering committee, but my personal opinion is that choice of language is a technical decision best made by the active maintainers, not a steering committee decision. I am not, of course, an active maintainer. Ian