If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

D Language Still Showing Promise, Advancements

06-19-2013, 09:30 AM

Phoronix: D Language Still Showing Promise, Advancements

The D programming language continues to advance and show signs of promise as a high-quality computer programming language that may eventually prove competition for C. Last month there was the 2013 D programming language conference where a lot was discussed...

Will never replace C/C++ until they drop the GC, there's no real argument for GC in a systems language, using C++11 smart pointers feels really good.

Nope. GC can actually be more efficient than manual memory management. And those who absolutely must go around it, it's easy to either turn it off or simply avoid using functions that invoke it. See this presentation for more information on the subject:http://www.youtube.com/watch?v=1MF5bcmvJ0o

Not all standard library functions invoke it; and whenever you need to use something that does invoke it, and you do that sparingly, the GC won't slow you down. Again, refer to the presentations. Here they are using D in a game engine by avoiding GC. Here they are using D in a performance-critical environment and still have the GC enabled.

Comment

Well, GC can be more efficient than manual memory management, if the manual management is badly implemented .

D is more an alternative to C++ than to C, due to its high complexity and similar features. On the other hand, Go can be viewed as a better C (possibly slower and not as versatile, but with great improvements and simplicity.)

Comment

There is also Rust, which is exactly like D (C ABI compatible, focus on productivity and clarity, neat syntax) except it uses manual memory management if you really want it.

I always see D as the performance nuts Java or C# - you get native performance and garbage collection, better features (function pointers / references, lambdas, and contracts are wonderful, global scope, and C# delegates don't compare) and I see Rust as the functional programmers C++ (syntax brevity, less boilerplate, only downsides are that it carries over some syntax pitfalls).

Comment

Well, GC can be more efficient than manual memory management, if the manual management is badly implemented .

D is more an alternative to C++ than to C, due to its high complexity and similar features. On the other hand, Go can be viewed as a better C (possibly slower and not as versatile, but with great improvements and simplicity.)

The problem with GC is not speed, but lack of control, IMHO. I want to know when things get collected, for low level programming. So, the smart pointer idea works better than GC for that type of work, I think

I agree that D compares with C++, not C. I was surprised when I saw Michael's article.

Go, sure, it is interesting. I don't think it is a C replacement, but it might become a low level language of interest for many applications. What I have in mind is that easy multithreading will become more and more relevant. Where I work, we are using 24 virtual processors in our workstations. I can see 100 arm cores running desktops in a few years. Giving people a language that is 20% slower _per_ core, but allows them to easily distribute the code to a 100 threads, hell, isn't that sweet!

Love the concept of ranges in D.
Although using a syntax that tells not to include the number that says where to stop comes over a little non-intuitive and strange to me.
(Even saw an example that needed to do extra calculations because it was one less than the actual end. The choice of how ranges work could have been better.)

You mean the ARC that got added in C++11 in the form of Smart Pointers, Shared Pointers and Widgets? :P