This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Move GDB to C++ ?


> Date: Tue, 29 Jul 2008 12:51:51 -0400
> From: Andrew Cagney <cagney@gnu.org>
> 
> Mark Kettenis wrote:
> >> Date: Thu, 10 Jul 2008 11:46:15 -0700
> >> From: Stan Shebs <stanshebs@earthlink.net>
> >>
> >> 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?

Andrew, I agree with much of what you're saying here.  There are many
areas in GDB that could use the attention of someone who can take
astep back from it and see whether a subsystem can be transformed in
something that's constructed in a simpler and more straightforward
way.  I don't believe for a moment that switching to C++ will help
with that (let alone that switching to C++ will make this happen
automagically).  Virtually every C++ software project that I've seen
in my life suffers from overdesign (useless abstraction layers,
misapplied "design patterns", escalated generic programming).  I
stronly believe it is better to invest our time in cleaning up and
extending the existing codebase instead of converting it to a new
programming language.

I really feel all these discussions about our toold (switching from
cvs to svn or git, replacing C with C++, migrating our bugs from gnats
to bugzilla) are a waste of time.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]