This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Switching to C++ by default in 4.8
On 04/10/2012 11:39 PM, Miles Bader wrote:
> Torvald Riegel <triegel@redhat.com> writes:
>> I hate to bring this up, but in my personal experience, getting started
>> with LLVM was _much_ easier than with GCC. LLVM is a much newer
>> codebase, so that's an advantage unrelated to the language.
>
> I dunno, I've some experience with LLVM as well, and I actually found
> it rather more difficult to "get started with" than gcc...
>
> Part of this is, of course, is that gcc has excellent internals
> documentation, whereas LLVM's is almost non-existant, but LLVM's much
> more "proper C++" coding style didn't seem to help a whole lot with
> making it understandable (and if anything may have made it _worse_).
My guess would be that there is no right and wrong here, it really
depends on what any given individual is familiar with. For example, I
certainly wouldn't have guessed that a GET_FIELD_DECL macro would cause
problems for autocompletion, since I personally don't use that kind of
thing.
However, what's important in a project is to pick conventions and stick
to them. For example, a lot of people initially loathe the GNU C
indentation style, but professional developers adapt themselves to
whatever style a project has chosen. There is nothing to be gained but
anarchy if personal preferences lead to churn of the "let's reindent" or
"let's rewrite in <my favourite language>" kind.
In the short term, a partial conversion to C++ gains us nothing. Even
ignoring the bugs inevitably caused by any such project, we'll end up
with a strange mish-mash of styles for a very long time, which instead
of helping anyone can only lead to confusion. I don't see anyone
committing to invest the time in converting even an entire subsystem let
alone the whole compiler. Maybe a subsystem conversion would be a good
thing to try on a branch and then present the results to the community
for evaluation. This would be better than lowering the barrier now for
all sorts of random but uncoordinated conversion efforts.
Bernd