Announcement

Collapse
No announcement yet.

GCC Can Now Be Worked On In C++

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by sylware View Post
    Hu? C++ in a C compiler? Are gcc devs high on drugs?
    GCC has for a very long time now supported multiple languages and hardly specific to C anymore. To be misinformed AND insulting is hardly a good combination. Even assuming that GCC is only a C compiler, there is nothing wrong with writing it in a different language if there is a benefit to doing so. It is entirely up to the developers to decide what the efficient method is.

    Comment


    • #12
      Great, now GCC will take even longer to compile.

      Comment


      • #13
        Originally posted by RahulSundaram View Post
        GCC has for a very long time now supported multiple languages and hardly specific to C anymore.
        Yes, we all know it's Gnu Compiler Collection, not Gnu C Compiler.
        As long as it will forever be possible to compile the C compiler without having the C++ compiler part of GCC, everyone should be rather happy...
        (just like it'd be a nice thing that you could fully compile a C++ compiler without ever having a C compiler in GCC; I don't know whether it's possible now, someone who knows could pong back)

        Comment


        • #14
          Originally posted by sylware View Post
          Hu? C++ in a C compiler? Are gcc devs high on drugs?
          GCC - Gnu Compiler Collection

          Does not only compile c-code, so your saying is moot.

          Comment


          • #15
            Originally posted by Ex-Cyber View Post
            The only actual object-oriented feature I see mentioned is multiple inheritance, which is not exactly universally accepted even among OO programmers (Java and C# deliberately omitted it in favor of single inheritance + interfaces, for example).
            They also mention templates. As far single inheritance + interfaces, that is a castrated form of multiple inheritance. In that capacity, all but one class from which a base class inherits must be abstract. It is a way of dealing with name-space collisions, although not a particularly good way and it is still a form of multiple inheritance.

            Originally posted by RahulSundaram View Post
            GCC has for a very long time now supported multiple languages and hardly specific to C anymore. To be misinformed AND insulting is hardly a good combination. Even assuming that GCC is only a C compiler, there is nothing wrong with writing it in a different language if there is a benefit to doing so. It is entirely up to the developers to decide what the efficient method is.
            C++ was originally called C with Classes. It is a dialect of C and its features directly translate into things in C. The objects are just structures with function pointers and corresponding function pointer tables. Classes are just collections of functions that take objects as their first parameters. Templates and function overloading are just short hand notations for functions that would have been given different names in C. All of the features of encapsulation, and the ways in which it can be broken, which includes friend functions, are just a form of structure that a programmer would have enforced on his own anyway, assuming he was writing good code.

            From a fundamental perspective, C++ is nothing more than a shorthand notation for C. The only aspect in which they differ is in exception handling, which is something that was tacked onto C++, is entirely optional and is often not used. Good programmers never had a need for exception handling anyway.

            Comment


            • #16
              Originally posted by Shining Arcanine View Post
              ...
              there is so much wrong with this post, i wouldn't know where to begin... don't try to be a wise-ass about stuff you aren't really that familiar with.

              Comment


              • #17
                Originally posted by justinkb View Post
                there is so much wrong with this post, i wouldn't know where to begin... don't try to be a wise-ass about stuff you aren't really that familiar with.
                How about you begin, hmm? Reading your post is waste of everyone's time otherwise.

                cheers

                Comment


                • #18
                  Originally posted by reavertm View Post
                  How about you begin, hmm? Reading your post is waste of everyone's time otherwise.

                  cheers
                  maybe read a few good C++ books, say Modern C++ Design by Alexandrescu for example. you'll get an idea why C++ isn't just syntactic sugar on C. not in your wildest dreams could you do in C what is demonstrated in that book. in particular, templates are a game changer, not just "a shorthand notation," as Shining Arcanine stupidly called it.

                  his argument is moot anyway, since by that reasoning any programming language by definition would just be syntactic sugar on writing machine code. i think we can all agree that is a stupid notion to defend.

                  Comment


                  • #19
                    Originally posted by justinkb View Post
                    maybe read a few good C++ books, say Modern C++ Design by Alexandrescu for example. you'll get an idea why C++ isn't just syntactic sugar on C. not in your wildest dreams could you do in C what is demonstrated in that book. in particular, templates are a game changer, not just "a shorthand notation," as Shining Arcanine stupidly called it.
                    C++ templates are a game changer as much as macrodefinitions in C.
                    Alexandrescu was so much enthusiastic about C++ that he decided to design his own programming language. And abusing templates is as bad as abusing C macrodefinitions in terms of code safety and readability - you don't need to read books to know it - you need to write code.
                    Technically every aspect of C++ can be implemented by the means of C macrodefinitions, in this regard C++ doesn't bring anything exciting apart from tighter type checking and primitive object oriented programming.
                    Of course it's improvement over C, but just a bit.

                    Comment


                    • #20
                      Originally posted by reavertm View Post
                      C++ templates are a game changer as much as macrodefinitions in C.
                      Alexandrescu was so much enthusiastic about C++ that he decided to design his own programming language. And abusing templates is as bad as abusing C macrodefinitions in terms of code safety and readability - you don't need to read books to know it - you need to write code.
                      Technically every aspect of C++ can be implemented by the means of C macrodefinitions, in this regard C++ doesn't bring anything exciting apart from tighter type checking and primitive object oriented programming.
                      Of course it's improvement over C, but just a bit.
                      pretty much all of what you said here is simply untrue, so I can't be bothered anymore with discussing this here. "every aspect of C++ can be implemented with macro definitions"... i lol'd.

                      Comment

                      Working...
                      X