Announcement

Collapse
No announcement yet.

Merging The GNU D Compiler Into GCC, Again

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

  • phoronix
    started a topic Merging The GNU D Compiler Into GCC, Again

    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

  • GreatEmerald
    replied
    Originally posted by Wyatt View Post
    As far as C++ goes, SWIG has D codegen now; have you tried it? (What game?)
    Oh, I didn't know that; that's pretty nice! I had to write quite a bit of wrapper code myself to get things working before. But it did work in the end.

    The game is called Arcomage Clone, I made a first Alpha release a bit back, and when it's in the RC stages, I'll see to packaging it to different distributions, as it's cross-platform and opensource.

    Leave a comment:


  • Wyatt
    replied
    Originally posted by GreatEmerald View Post
    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.
    As far as C++ goes, SWIG has D codegen now; have you tried it? (What game?)

    Leave a comment:


  • GreatEmerald
    replied
    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.

    Leave a comment:


  • tuppe666
    replied
    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.

    Leave a comment:


  • Michael_S
    replied
    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.

    Leave a comment:


  • ibuclaw
    replied
    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.

    Leave a comment:


  • Wyatt
    replied
    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.)

    Leave a comment:


  • F i L
    replied
    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 ;-)

    Leave a comment:


  • GreatEmerald
    replied
    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.

    Leave a comment:

Working...
X