Announcement

Collapse
No announcement yet.

D Language Front-End Proposed For GCC 8, 800k Lines of Code

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

  • #31
    Originally posted by ldo17 View Post

    Any option to use automatic reference-counting as a first resort, before falling back to GC? This is how Perl and Python work. This should not be as cache-hostile as insisting on pure GC.
    There a couple of options here.
    1) Idiomatic D code tends to be lazy evaluting which favours stack allocation and is cache friendly.
    2) Doing ARC in a provably safe way is a feature that is currently being worked on this will not fall back automatically to GC but could be done.
    3) There is a standard interface for Allocators (currently experimental) in the standard library. If you write your code using this interface you can start with GC (or malloc) and swap that out for a custom allocation scheme as it becomes clearer what your requirements are in a clean way. This will probably be the way to do things going forward.

    Comment


    • #32
      Originally posted by wizard69 View Post
      Is it me or has D's opportunity for success passed slready? Serious question here as C++ has been vastly improved for the old guard and the newer generation of developers has better languages to choose from. A GC just seems to be D's biggest downfall for the areas it seems to be targetted at.
      Maybe.
      From what I can see though, D is both more powerful and easier to use when it comes to compiletime generated code. D is easy for a C/C++ coder to pick up and writing bad code in C++ is significantly easier. C++ and Rust are a good match for a team of expert programmers, D is going to cause less problems if your team is of mixed ability. The GC is one of the biggest problem for me too but I am pretty happy with the new Allocator interface and can see that as a way forward.

      Comment


      • #33
        I am not sure anyone mentioned it yet but the most interest feature of D to me is metaprogramming (code that generated code). C++ supports template meta-programming but it's not pretty and it's more limited than D's metaprogramming.

        See


        and the "Metaprogramming" section in the link below for more info.

        Comment

        Working...
        X