I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. I personally don't do systems programming because I'm not smart enough but the little bit I have done, I found D to be the most-natural feeling (even over Rust), and D has been around a lot longer. I suppose timing is everything for these kinds of things.
> I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. D is still build around a GC so it doesn't really fit into a discussion about GC free languages. Unless you want to focus on its "better C" subset, which I think puts it at a disadvantage compared to any language not fundamentally designed around the presence of a GC.
Using D to Create the World’s Fastest File System
141–150 of 167 posts
Re: Using D to Create the World’s Fastest File System
#142Earlier quoted context omitted.
> I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. D is still build around a GC so it doesn't really fit into a discussion about GC free languages. Unless you want to focus on its "better C" subset, which I think puts it at a disadvantage compared to any language not fundamentally designed around the presence of a GC.
Nah, -betterC gives you an advantage over C. It isn't meant to give you an advantage over languages like C++. Its in the name after all ;)
Re: Using D to Create the World’s Fastest File System
#143Earlier quoted context omitted.
Not to forget, C++ template meta-programming was discovered by accident. That's probably the only feature (and C++ is the only language) that I can think of in any language that's discovered by accident and is of utmost essential for introspection capabilities.
> Not to forget, C++ template meta-programming was discovered by accident. yep, in 1993 some graybeard working on GCC checked files by last modification date to do some refactoring and saw one that hadn't changed since july 7, 1926, aptly called "alexandrescu.c". When he opened it, his computer started glowing yellow and his BSD prompt suddenly changed from '$' to '>'. He executed the testcase associated and the horr…
Re: Using D to Create the World’s Fastest File System
#144Earlier quoted context omitted.
Actually GC can decrease overhead depending on your use of memory since it only frees when memory when it's needed.
"Overhead" is a term with many definitions. Non-conservative GCs use a lot of extra metadata to be able to figure out what's a pointer and what isn't. Conserative GCs leak. In both cases GCs cut into worse case latency.
Yes, but usually the leak is bounded [0], although I'm not aware they evaluated real-world gaming engines. But I guess frame jitter is the bigger problem there.
Re: Using D to Create the World’s Fastest File System
#145Earlier quoted context omitted.
But that is exactly the point. One should not constrain productivity just based on hypothetical goals, web scale and such similar arguments. Doing the next Fortnite, Crysis or ground breaking AR/VR/Ray Tracing? Sure, every ms/byte counts. Doing a typical Flash like casual game, game prototypes at Ludum Dare, participating at IGF? Having a GC around isn't the biggest concern.
> Doing a typical Flash like casual game, game prototypes at Ludum Dare, participating at IGF? Having a GC around isn't the biggest concern. But for those cases, what would move you to use D instead of an entirely memory-safe language like Python or Lua? To justify using D for games, you'd need to find a use-case where speed (e.g. targeting 60fps) is high-priority enough to be writing a lot of low-level code; and yet…
Some AAA studios do use D instead of a C++ based script language exactly for that.
Re: Using D to Create the World’s Fastest File System
#146I have wondered for awhile now why Rust is getting all this attention of being "Like C but safe and cool!", but no one would mention D. I personally don't do systems programming because I'm not smart enough but the little bit I have done, I found D to be the most-natural feeling (even over Rust), and D has been around a lot longer. I suppose timing is everything for these kinds of things.
Re: Using D to Create the World’s Fastest File System
#147Earlier quoted context omitted.
The Rust community is extremely hostile, especially against other languages, and D in particular.
Where do you see that happening? I'd love to tell some people to cut it out!
Re: Using D to Create the World’s Fastest File System
#148Earlier quoted context omitted.
And yet there are GCs in Unity and Unreal Engine, the most popular game engines of today.
Only the scripting code is GCed. The core engine in both cases is C++ with manual memory management for the reasons stated above.
And in Unreal you can use GC in whatever components you feel like, it is a matter of weighting where it makes sense.
Re: Using D to Create the World’s Fastest File System
#149Earlier quoted context omitted.
D is a work of love by WalterBright and the community. I like to think of D as a true successor to C++ when people compare Go to a C++ alternative. It is between Rust and Go but it doesnt do away with Object Oriented programming or the many paradigmns that exist for different programming approaches. I usually tell people if you can grasp C, C++, C# or Java you are going to understand plenty of Go. Rust has a larger l…
I think the optional part might have a bit to do with it. In Java, C#, Go you are 'stuck' with the garbage collector, so people learned to live with it and usually realized it's not as bad as people claim it to be.
Using an OS written in a GC enabled systems language made me realize that not only it was viable, it was quite productive to work in such environments.
The problem is having a big name OS vendor willing to push it to the nameless crowds no matter what.
So far we have to get happy with half-hearted steps like Swift, ChromeOS/Android(Things) with heavily constrained NDK, .NET/UWP on Windows and maybe in a decade with more baby steps, we are able to reach what Oberon/Topaz/Spin/Inferno/Singularity/Midori had on their design.
Re: Using D to Create the World’s Fastest File System
#150Earlier quoted context omitted.
Here's a comparison with Nim. In my experience Nim is one of the fastest both in terms of execution and compile time. https://github.com/timotheecour/D_vs_nim
I see a lot of comparisons between unlike languages (Go and Rust for example) but it looks like D and Nim really are competing for the same niche.