Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: GCC Can Now Be Worked On In C++

  1. #11

    Default

    Quote 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.

  2. #12
    Join Date
    Jan 2009
    Location
    Columbus, OH, USA
    Posts
    323

    Default

    Great, now GCC will take even longer to compile.

  3. #13
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    1,670

    Default

    Quote 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)

  4. #14
    Join Date
    Jan 2010
    Posts
    159

    Default

    Quote 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.

  5. #15

    Default

    Quote 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.

    Quote 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.

  6. #16
    Join Date
    Apr 2009
    Posts
    8

    Default

    Quote 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.

  7. #17
    Join Date
    Jul 2008
    Location
    Wrocław/Poland
    Posts
    37

    Default

    Quote 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

  8. #18
    Join Date
    Apr 2009
    Posts
    8

    Default

    Quote 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.

  9. #19
    Join Date
    Jul 2008
    Location
    Wrocław/Poland
    Posts
    37

    Default

    Quote 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.

  10. #20
    Join Date
    Apr 2009
    Posts
    8

    Default

    Quote 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.

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
  •