Page 3 of 11 FirstFirst 12345 ... LastLast
Results 21 to 30 of 106

Thread: GCC Moves Forward With Conversion To C++

  1. #21
    Join Date
    Apr 2012
    Location
    Canada
    Posts
    42

    Default

    Quote Originally Posted by deanjo View Post
    Hey then we all should be switching to Mono right?
    Haha, I can't even read that with a straight face.

  2. #22
    Join Date
    Jul 2009
    Posts
    351

    Default

    In the distant past, this would have met with rolling eyes, because all the other vendors' C++ compilers were so crappy that you wouldn't be able to bootstrap gcc. Haha the good old days of bootstrapping gcc onto Solaris 2.6 so we could run gimp on the ultrasparc with the big monitor.

    I've had some good hearty laughs at the error messages, as I've attempted to port "standard" C++ code to Unixes like HPUX and Tru64.

    In the end I had to rewrite it in C, because that was the only subset of C++ that was actually portable.

    If your C code is already getting compiled as C++ anyway, there's certainly no harm in grabbing a few of the more useful bits. The whole C/C++ thing is a continuum, so you can use as much or as little of C++ as you like.

    Bad C++ code comes from bad C++ programmers, not from C++ compilers.

    Yeah I've implemented "virtual functions" in C, but it's truly a pain in the butt, I'll take C++ virtual functions anytime.

  3. #23
    Join Date
    Nov 2007
    Posts
    968

    Default

    Quote Originally Posted by johnc View Post
    Kudos to him for copying UNIX verbatim but is there anybody on the planet more opinionated than him?
    Hello.


  4. #24
    Join Date
    Jun 2011
    Posts
    59

    Default

    Why C++ and not Python or even Lua? Those higher level languages allow for more abstraction. Python, for one, has an object oriented model with less C-like hackery intermixed. Embedding one of them into the core would probably benefit more.

    Let's see if GCC devs dig their own grave or manage to stay afloat. I'm kind of skeptical about the latter without reimplementing toolchain in C++ from scratch (look at LLVM/Clang).

  5. #25
    Join Date
    Jun 2011
    Posts
    7

    Default

    Quote Originally Posted by bug! View Post
    Why C++ and not Python or even Lua? Those higher level languages allow for more abstraction. Python, for one, has an object oriented model with less C-like hackery intermixed. Embedding one of them into the core would probably benefit more.

    Let's see if GCC devs dig their own grave or manage to stay afloat. I'm kind of skeptical about the latter without reimplementing toolchain in C++ from scratch (look at LLVM/Clang).
    Great alias's think alike !

  6. #26
    Join Date
    Feb 2011
    Posts
    426

    Default

    Quote Originally Posted by bug1 View Post
    The reasons they cite being
    • C++ is a standardized, well known, popular language.
    • C++ is nearly a superset of C90 used in GCC.
    • The C subset of C++ is just as efficient as C.
    • C++ supports cleaner code in several significant cases.
    • C++ makes it easier to write and enforce cleaner interfaces.
    • C++ never requires uglier code.
    • C++ is not a panacea but it is an improvement.


    None of which are technical benefits, GCC are choosing to compromise on quality for the percieved convenience of its implementation.

    The role of a programmer is to translate real world problems into the realm of the machine, this change clearly doesnt reflect that understanding. You would think, as compiler developers they would understand its purpose better.
    You should read the article that is quoted from. They list a number of tasks they intend to accomplish with the conversion, and each task provides a description of how the switch to C++ will have specific, technical benefits to GCC. If you want to argue against the benefits of the chance, it would be better to argue against the specifics in the original article, rather than the summary quoted by somebody not involved in the project.

  7. #27
    Join Date
    Feb 2011
    Posts
    426

    Default

    Quote Originally Posted by bug! View Post
    Why C++ and not Python or even Lua? Those higher level languages allow for more abstraction. Python, for one, has an object oriented model with less C-like hackery intermixed. Embedding one of them into the core would probably benefit more.
    Obvious troll is obvious, but I think it would have been better if they followed the PEP system python uses. The proposal article provides a good overview of the logic behind the change, but it lacks the detail and rigor of a PEP.

    Quote Originally Posted by bug! View Post
    Let's see if GCC devs dig their own grave or manage to stay afloat. I'm kind of skeptical about the latter without reimplementing toolchain in C++ from scratch (look at LLVM/Clang).
    You do realize that C++ is largely a superset of C, right? The first step, as they said, was making GCC build with C++ instead of C (which is already done). After that, they can use as many or as few C++ features as they want, picking only those features that will provide a technical benefit (the article, as I said, explains in some details what the specific features they wish to implement are and what their benefits are).

  8. #28
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    3,570

    Default

    They can write in whatever language they prefer. I only lament the fact that future GCCs will take about 20x longer to build due to this.

  9. #29
    Join Date
    Oct 2007
    Posts
    912

    Default

    Quote Originally Posted by curaga View Post
    They can write in whatever language they prefer. I only lament the fact that future GCCs will take about 20x longer to build due to this.
    Why would it take longer?
    Regarding putting C++ into gcc, there's been talk of it for a long time, and their general guidelines are to only use something if it makes things "better". There are some things for which C++ is better suited than C, and the idea is to use C++ for those cases. When I say use C++, of course, I mean "something in C++ that's not in C".

  10. #30
    Join Date
    Dec 2010
    Posts
    686

    Default

    Quote Originally Posted by 0xCAFE View Post
    This is a bad thing, right? C++ is such a horrible and ugly language.
    As opposed to beautiful plain C?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •