Announcement

Collapse
No announcement yet.

GCC Moves Forward With Conversion To C++

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

  • #71
    Originally posted by LightBit View Post
    Yes, I know it's collection of compilers.
    Back-end is also part of C compiler, so it should also be written in C.
    But there's also a C++ back end. Furthermore, there's a Fortran backend. So should GCC be written in Fortran? And there's Objective-C, Objective-C++, Ada, Go, Java....

    The C backend is just one tiny bit of GCC. So why should GCC be written in C?

    Comment


    • #72
      Originally posted by bug! View Post
      It is also a *fact* that C++ never requires uglier code than C, simply because C++ is almost a superset of C90 and thus if one can write something cleanly in C, one can write it in just the same way in C++.
      So you write C90 code and compile it with C++ compiler and then call it C++ code? What is advantage of that?

      You can write very ugly code in both, but in C++ it's easier to write ugly code, because it's more complex.

      Comment


      • #73
        Originally posted by LightBit View Post
        in C++ it's easier to write ugly code, because it's more complex.
        lol ...

        Comment


        • #74
          Originally posted by RealNC View Post
          But there's also a C++ back end. Furthermore, there's a Fortran backend. So should GCC be written in Fortran? And there's Objective-C, Objective-C++, Ada, Go, Java....

          The C backend is just one tiny bit of GCC. So why should GCC be written in C?
          Because C is "standard" for UNIX.
          Back-end should be universal like LLVM.

          Comment


          • #75
            Originally posted by LightBit View Post
            Yes, I know it's collection of compilers.
            Back-end is also part of C compiler, so it should also be written in C.
            Obviously we should all run PyPy as our python interperter (with the python backend of course, the other one is written in C. In addition, we should write Mono in .net, assemblers in x86 assembly, and the JRE should be written in java, right?

            There is absolutely no reason to tie an implentation of a language to the language itself.

            Comment


            • #76
              Originally posted by LightBit View Post
              Because C is "standard" for UNIX.
              Back-end should be universal like LLVM.
              If C is standard, then C++ is compatible with that standard and there's no problem. No?

              Also, Linux isn't Unix. It's a clone of Unix and added many more standards than what Unix had. So just because something is standard in Unix doesn't mean that Linux can't replace it.
              Last edited by RealNC; 14 August 2012, 04:35 PM.

              Comment


              • #77
                Originally posted by ShadowBane View Post
                Obviously we should all run PyPy as our python interperter (with the python backend of course, the other one is written in C. In addition, we should write Mono in .net, assemblers in x86 assembly, and the JRE should be written in java, right?

                There is absolutely no reason to tie an implentation of a language to the language itself.
                No, but it should not be written in higher-level than itself.

                Comment


                • #78
                  Originally posted by LightBit View Post
                  No, but it should not be written in higher-level than itself.
                  "Itself" in this case is GIMPLE. So should GCC be written directly in GIMPLE? Do you how hard that is to do by hand?

                  Comment


                  • #79
                    in C++ it's easier to write ugly code, because it's more complex.

                    Originally posted by RealNC View Post
                    lol ...
                    quouting realnc lol .... <-- best possible answer

                    Comment


                    • #80
                      Originally posted by LightBit View Post
                      No, but it should not be written in higher-level than itself.
                      Assemblers are written in high level languages. (at least higher level than assembly.) There is absolutely no reason why compilers can't/shouldn't be written in languages higher level than the target language.

                      Comment

                      Working...
                      X