public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Michael Elizabeth Chastain <mec@shout.net>
To: ac131313@redhat.com, gdb@sources.redhat.com
Subject: Re: Allow C++ or C99 in sim/*?
Date: Sat, 02 Aug 2003 01:11:00 -0000	[thread overview]
Message-ID: <200308020111.h721BTwe021440@duracef.shout.net> (raw)

Not like I work in sim/ anyways ... so all this is from the
peanut gallery.

I like C++ more than C99.

If we go with C99, and actually start using C99 features, we'll get
unhappy users who still have C90 compilers.  And if we tell them "just
use gcc" (which I think is a valid response) then we might as well
go all the way to C++.

My experience with C++ is that it makes some maintenance tasks easier.
If there is a crappy class, it's easier to rip out / rewrite a class in
C++ than it is to do the equivalent in C.

We would get massive dogfood benefits from writing in C++.  That would
be the major benefit.

For a C++ coding standard, there are several views.  The official Bjarne
Stroustrup view is to use the whole freakin' language because every
feature in the language is there for a good reason.  For the purpose
of eating dogfood, that is a reasonable thing.

My personal view is that I stay away from templates and rtti because
they require link time support, thus are less portable.  Also I stay
away from namespaces because they confuse gdb.  That would be a reason
*for* using namespaces for us!  And I eschew exceptions because I don't
like the way they were glommed onto the language as an afterthought.

gcc 2.95.3 has a usable C++ compiler, although it's incomplete in many
areas.

Michael C

             reply	other threads:[~2003-08-02  1:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-02  1:11 Michael Elizabeth Chastain [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-02  0:16 Andrew Cagney
2003-08-02  0:43 ` Daniel Jacobowitz
2003-08-02  0:47 ` David Carlton
     [not found] ` <mailpost.1059783391.21631@news-sj1-1>
2003-08-02  1:30   ` cgd
2003-08-05  4:25     ` Andrew Cagney
2003-08-05  4:27       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200308020111.h721BTwe021440@duracef.shout.net \
    --to=mec@shout.net \
    --cc=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).