Live data from Hacker News

Why I use the D programming language for scripting (2021)

opensource.com

51–53 of 53 posts

Re: Why I use the D programming language for scripting (2021)

#51

If I write an application I use Java as I am most comfortable with it. But it is not always the best choice. If I needed to write an application for windows with a GUI I would be more successful with C# as it would look more native. If I am writing a command line tool it would be a faster and smaller application if I build it in Go, Dart or Crystal. But then I would need to be good in it as well. I like seeing these…

I feel like the Dart syntax is very very close to Java!

If you like to experiment with a language that is similar to Java is suggest you try Vala. It looks a bit like Java but has some differences and uses ref counting instead of garbage collection. It compiles to C++ (or C?) and then to native; this makes the build extremely steep and difficult but once you get that going it is really nice.

Re: Why I use the D programming language for scripting (2021)

#53
post #3

I used D for a small prototype. I wrote that same program in GO, C# and Java(native compiled with GraalVM). The CPU and RAM usage of D-lang out performed all other languages. Compiled binary size: D-Lang : 450KB Go : 2 MB C#(.NET) : 8 MB Java-GraalVM: 9 MB D-Lang CPU & RAM Usage is also less than GO. Unfortunately D-Lang is not popular, not many libraries available.

Now compare D app binary sizes with those of C and Free Pascal, and then with Zig, Odin, etc.

Java and C# are not really systems programming languages; they carry too much baggage for that.

Even Go is not too comparable to D

Post reply on HN