Originally posted by deanjo
View Post
Announcement
Collapse
No announcement yet.
GCC Moves Forward With Conversion To C++
Collapse
X
-
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.
Comment
-
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).
Comment
-
Originally posted by bug! View PostWhy 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).
Comment
-
Originally posted by bug1 View PostThe 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.
Comment
-
Originally posted by bug! View PostWhy 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.
Originally posted by bug! View PostLet'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).
Comment
-
Originally posted by curaga View PostThey 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.
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".
Comment
Comment