From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32036 invoked by alias); 11 Apr 2012 18:17:20 -0000 Received: (qmail 32027 invoked by uid 22791); 11 Apr 2012 18:17:17 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f51.google.com (HELO mail-wg0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Apr 2012 18:17:04 +0000 Received: by wgbed3 with SMTP id ed3so967284wgb.8 for ; Wed, 11 Apr 2012 11:17:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.24.7 with SMTP id q7mr8854290wif.11.1334168222683; Wed, 11 Apr 2012 11:17:02 -0700 (PDT) Received: by 10.216.93.203 with HTTP; Wed, 11 Apr 2012 11:17:02 -0700 (PDT) In-Reply-To: References: <4F7B356E.9080003@google.com> <4F7C35A3.3080207@codesourcery.com> <20120410084614.GJ6148@sunsite.ms.mff.cuni.cz> <1334078968.11195.64.camel@triegel.csb> <1334149073.3101.23.camel@triegel.csb> Date: Wed, 11 Apr 2012 18:17:00 -0000 Message-ID: Subject: Re: Switching to C++ by default in 4.8 From: Andrew Pinski To: Xinliang David Li Cc: Richard Guenther , Torvald Riegel , Michael Matz , Jakub Jelinek , Bernd Schmidt , Gabriel Dos Reis , David Edelsohn , Diego Novillo , gcc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00442.txt.bz2 On Wed, Apr 11, 2012 at 10:24 AM, Xinliang David Li wr= ote: > On Wed, Apr 11, 2012 at 6:13 AM, Richard Guenther > wrote: >> On Wed, Apr 11, 2012 at 2:57 PM, Torvald Riegel wro= te: >>> On Wed, 2012-04-11 at 11:24 +0200, Richard Guenther wrote: >>>> On Tue, Apr 10, 2012 at 7:29 PM, Torvald Riegel w= rote: >>>> > Think about programmers new to GCC for a second, and about code >>>> > completion tools. >>>> >>>> Honestly I care 1000 times more for existing GCC developers. =C2=A0Bef= ore >>>> new programmers will have an easier time with GCC _existing_ GCC >>>> developers will have to spend at least two GCC release cycles (that's >>>> very optimistic) turning the GCC codebase upside-down. =C2=A0Every >>>> existing GCC developer you lose on that way will slow down that >>>> process and for every existing GCC developer you probably need more >>>> that one "new" GCC developer starting. >>>> >>>> It's very easy for me to do the math and conclude that losing even _on= e_ >>>> experienced existing GCC developer makes this whole transition-to-C++ >>>> thing a non-starter. >>> >>> I agree that less work-force in the transition would be a problem. =C2= =A0But >>> is C++ (perceived to be) so bad that it would make people change their >>> jobs? =C2=A0I mean, we're not talking about the experienced hobbyists h= ere, >>> or are we? >> >> Until some company puts money behind converting to C++ then yes, >> it's the hobbyists (or the non-hobbyists in their spare time). >> >>> However, the concern you raised is only one part of the problem. =C2=A0= The >>> other is that, put in a simplified way, GCC is competing with LLVM about >>> new and/or non-fulltime-compiler developers. =C2=A0For me, it looks lik= e LLVM >>> is more appealing to them, and I believe part of the reason for that is >>> the codebase. >>> Now, how many release cycles do we have until LLVM is basically good >>> enough to be used as a distro compiler (e.g., until code quality and >>> confidence in bug freedom is sufficiently similar)? =C2=A0If we haven't >>> ensured that GCC is appealing by this time, why should new programmers >>> then start considering GCC and not just go by default to LLVM? >> >> If you look at the existing developer base then the majority of it is pa= id. >> And frankly while empolyers may listen to their employees, switching >> from GCC to LLVM is not something they'd do based on a C++ vs. C >> implementation language (but maybe based on availability of consulting >> services or new employees or viability of using LLVM for weird architect= ures >> or simply based on customer demand). > > Yes, GCC is still in some comfortable zones such as generated code > quality, performance, etc, but the advantage and gap is quickly > reducing (e.g, LLVM is the default compiler in Xcode) -- and other > advantages in LLVM (will soon) outweigh its disadvantages. It has a > very modern frontend Clang which is *very* attractive to application > developers (better diagnostics, better IDE integration, easier to > develop tools on, lean and mean etc); and believe it or not, their > compiler developer base is also growing just for the perception it is > more modern and it is easier to develop on (and words are spreading; > there were also independent investigations on ease of development on > some compiler features in gcc and LLVM from new developers and the > result is in favor of LLVM). The main reason why LLVM is the default compiler in XCode is license rather any technical reason. And GCC usually has better diagnostic than clang except in those few areas which it does not (those some might say those areas are the most important ones). I have known people who does not want to deal with GCC because they are very anti GPL or GNU rather than GCC having a clean/modern interface. It is hard to win those guys over but those are the ones which are spreading in some cases FUD about GCC. -- Pinski