Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Merging The GNU D Compiler Into GCC, Again

  1. #1
    Join Date
    Jan 2007
    Posts
    13,407

    Default Merging The GNU D Compiler Into GCC, Again

    Phoronix: Merging The GNU D Compiler Into GCC, Again

    It's been talked about before, but it's being attempted again to merge GDC into GCC. GDC is the compiler front-end for the D programming language...

    http://www.phoronix.com/vr.php?view=MTEyMzM

  2. #2
    Join Date
    Dec 2011
    Posts
    1,932

    Default As I understand

    D have existed for a very long time and is very similar to C, but makes it easier and better.

    So I think it is kinda sad that D hasn't replaced C.

    But now with C11 and C++11, it seem that D is getting less relevant as C is catching up.

  3. #3
    Join Date
    Oct 2009
    Posts
    845

    Default

    Quote Originally Posted by uid313 View Post
    D have existed for a very long time and is very similar to C, but makes it easier and better.

    So I think it is kinda sad that D hasn't replaced C.

    But now with C11 and C++11, it seem that D is getting less relevant as C is catching up.
    I'd say it's much more akin to and competing with C++ being that it's object oriented with optional automated garbage collecting. I dabbled with it ages ago and it seemed like a nicely structured language, I wasn't impressed by the performance of the generated code back then but that was many moons ago and things have likely improved alot.

    Having it merged with GCC proper would likely expose more developers to it and thus hopefully lead to more people trying it out. It's has a hard road though, to break C++ dominance in the market D really has to be _alot_ better, else C++ will maintain it's hold due to sheer inertia.

  4. #4
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,395

    Default

    I'm a happy D user (mostly, until I run into some rather difficult to understand concepts like a function for splitting strings doesn't return an array of strings; but that's what the forums are for), and for one, I still don't really understand how different from current DMD is GDC. I never used GDC, and from what I did hear earlier, it was a bit behind the spec laid out by DMD. And, well, I don't really see a whole lot of reason to try it, as DMD works fine as well. The LLVM D compiler is interesting, though, as it has some functionality that even DMD doesn't so far. But then it's not cross-platform, so I never tried that, either.

    That said, I'd imagine that merging it to GCC could make packaging D program source easier, as it would be a bit easier to obtain the compiler. It's somewhat of a problem with DMD, as it's usually not a part of official packages of most distributions.

  5. #5
    Join Date
    May 2012
    Location
    Sunshine State
    Posts
    296

    Default

    Iain Buclaw, the creator of GDC, has had GCC 4.8 as his target for awhile now.

    D is a great language. It's still got it's rough areas where the language doesn't feel "as modern" as C# (DMD linking mostly), but that's quickly changing with improving IDE tools like Mono-D, an evolving highly-generic standards lib, and community members working towards a std Parser, COFF support (with embedded .di data, planned), etc. I've heard others complain about bugs, but coming into the language rather recently ~6-8 months ago, I've run into very few, and nothing major. GDC (GCC D Compiler) has excellent code-gen (as does LDC) and is very competitive with G++ in performance [citations needed], at least in my modest tests.

    People keep saying C++11 is closing the gap, and while that's true to a degree, I'd like to see a sane way to do Slices, Contracts, Templates & general Meta Programming, Unittest, and functional programming. All of which are very straight forward in D today. D's other simple, yet elegant features like scope statements and consistent pointer syntax may often be dismissed as unimportant, but once you get used to using them it's hard to go back to anything else.

    But don't take my word for it ;-)

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

    Default

    Quote Originally Posted by uid313 View Post
    D have existed for a very long time and is very similar to C, but makes it easier and better.

    So I think it is kinda sad that D hasn't replaced C.

    But now with C11 and C++11, it seem that D is getting less relevant as C is catching up.
    D1 has been around for a long time, yeah, but D2 is only just getting to a place we can, if we squint, call stable. The community has really grown in the last year or so, and it isn't showing signs of stopping. It's the most optimistic I've been about a C++ killer, to be sure.

    (The biggest hindrance I see right now is Optlink. Once we can disown ourselves of that turd, life will improve.)

  7. #7
    Join Date
    Jun 2012
    Posts
    1

    Default

    Quote Originally Posted by phoronix View Post
    It's been talked about before, but it's being attempted again to merge GDC into GCC. GDC is the compiler front-end for the D programming language...
    For clarification, it's been talked about before, but that's about it. Though GCC maintainers have given helpful comments on the anatomy of a GCC Frontend, and a good checklist of todos. This is the first attempt that have submitted to gcc-patches.

  8. #8
    Join Date
    Aug 2011
    Posts
    23

    Default

    C++ is an awesome language, but of course it's very complex. D (version 2) has some features that I don't think C++11 has or realistically can ever get without rewriting the language. "static if" compile time conditional compilation is much simpler and cleaner than the C++ preprocessor - see the comparison at the D Language website, http://dlang.org/pretod.html D also has "immutable", a stronger guarantee of the inability to change an object than "const" in C++ and "final" in Java. Per the current functional programming craze, immutable objects are nice for functional-style programming and passing information between threads. (D also has "const", and D's "const" works the same as it does in C++.) D's syntax for arrays and array slices is simple and convenient.

    Walter Bright said he would like to open source his own DMD compiler, but parts of it use proprietary code that he himself is using under license, and he doesn't own the rights to that code.

    I am in no way connected to Andrei Alexandrescu, but I thought his book on the D Programming Language was really good. I'm glad I bought it, though I admit I haven't found any non-trivial projects to write in D yet.

  9. #9
    Join Date
    Jul 2008
    Posts
    10

    Default

    I love the fact everyone else is comparing and contrasting features with similar languages, and I'm thinking maybe we will finally get those abstract shooters from ABA games that I've wanted for all this time.

  10. #10
    Join Date
    Sep 2008
    Location
    Vilnius, Lithuania
    Posts
    2,395

    Default

    Quote Originally Posted by Michael_S View Post
    I am in no way connected to Andrei Alexandrescu, but I thought his book on the D Programming Language was really good. I'm glad I bought it, though I admit I haven't found any non-trivial projects to write in D yet.
    Another strength of D is that the compiled code is binary compatible with C. I've written a game library entirely with D, then one frontend with D and one with C. It's a fairly simple library and a game, mind you, but D code scales well. So it could very well be used in large projects, even if they wouldn't be written completely in D due to unsupported libraries or such.

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
  •