bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ support?


From: Bob Proulx
Subject: Re: C++ support?
Date: Tue, 24 Oct 2006 22:23:42 -0600
User-agent: Mutt/1.5.9i

Karl Berry wrote:
> Is supporting compilation with C++ of interest?  (I'm not arguing for
> it, just reporting it, since Nelson went to the trouble of trying it.)

My opinion (which counts for very little here) is that while C++ is
designed to be as close to C as possible, but no closer, that it is
still not C.  C++ is not a strict superset of C.  It is close but not
perfect.  In particular many of the memory handling parts are not
compatible.  Silencing bogus C++ errors and warnings also silences
valid C errors and warnings.

It is possible to craft an environment using defines and inlines to
make conditional compilation compile C in the C compiler and C++ in
the C++ compiler to force it compile cleanly with either but this
means the result is less than optimal in either too.

I have worked on projects where people have tried to be both a C
project and a C++ project at the same time.  I found that C++
programmers were always making C mistakes and C programmers were
always making C++ mistakes.  And neither were allowed to program in
their language of choice but instead were forced into the least common
denominator overlay that we created.  I found it very frustrating.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]