Live data from Hacker News

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

opensource.com

11–20 of 53 posts

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

#11
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.

C# and Java have a large base. If you write a small application with it the size will be huge because they both link in the base in the application. It becomes more interesting with larger applications.

Not necessarily anymore now that .NET has had a lot of enhancements for compiling to native and stripping unused references.

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

#12
post #2

I've never given D a fair shake before, so my opinion of it is very weakly held, but up until now I've always thought of it as C++ with even more piles of crap bolted on. Reading the examples here makes me think that I was wrong and that I should give it a real try, because this looks like a sufficiently elegant language that I would actually want to use.

I've had the displeasure of having to use it professionally for a little while, and to be honest, I'd sooner rub chilli flakes into my eyeballs than have to deal with D's default garbage collector again. Seemed to be a cult-like language in the worst possible sense.

Could you briefly explain the problems with D's GC? Their docs say, "Since version 2.067, The garbage collector can now be configured through the command line" - would that help in your case?

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

#13
post #4

Given that D Go Rust etc. are all Turing complete, there's no difference on their ability to compute (perform) a function. The only difference is how easy is, and how much cr*p you need to suffer in the process. Yet I see here people patting themselves on the back just because they re-re-rewrote the algorithm of the day (git, computing the day of the week, etc) using all sorts of programming languages to claim they w…

What is in your list of acceptable languages, and what is your list of unnecessary languages?

Is date of creation a factor?

Because D was created last century.

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

#14
post #2

I've never given D a fair shake before, so my opinion of it is very weakly held, but up until now I've always thought of it as C++ with even more piles of crap bolted on. Reading the examples here makes me think that I was wrong and that I should give it a real try, because this looks like a sufficiently elegant language that I would actually want to use.

I've had the displeasure of having to use it professionally for a little while, and to be honest, I'd sooner rub chilli flakes into my eyeballs than have to deal with D's default garbage collector again. Seemed to be a cult-like language in the worst possible sense.

I think that the leaks are/(were?) 32bit only no?

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

#17
post #4

Given that D Go Rust etc. are all Turing complete, there's no difference on their ability to compute (perform) a function. The only difference is how easy is, and how much cr*p you need to suffer in the process. Yet I see here people patting themselves on the back just because they re-re-rewrote the algorithm of the day (git, computing the day of the week, etc) using all sorts of programming languages to claim they w…

You unwittingly conceded why it's valuable to attempt to improve on existing languages just two sentences in to this bizarre comment.

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

#18
post #4

Given that D Go Rust etc. are all Turing complete, there's no difference on their ability to compute (perform) a function. The only difference is how easy is, and how much cr*p you need to suffer in the process. Yet I see here people patting themselves on the back just because they re-re-rewrote the algorithm of the day (git, computing the day of the week, etc) using all sorts of programming languages to claim they w…

> Yet I see here people patting themselves on the back just because they re-re-rewrote the algorithm of the day

If you cannot re-create how do you know you understand? This is one of the best ways to learn. There is zero harm here. If you don't like it you can ignore it. :)

> Can't we focus on these please, instead of being proficient at elementary level in 40+ idioms?

No, we are not in an insect colony to specialize in things.

> We don't need D or another language on top of all others we have, and that we have plenty of problems for which there's NO solution to.

Why did we build cars when we have horses?

--------

Anyhow, it is hackernews, we do things we learn, we reinvent the wheel because we can, and we are better for it.

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

#19
post #13
post #4

Given that D Go Rust etc. are all Turing complete, there's no difference on their ability to compute (perform) a function. The only difference is how easy is, and how much cr*p you need to suffer in the process. Yet I see here people patting themselves on the back just because they re-re-rewrote the algorithm of the day (git, computing the day of the week, etc) using all sorts of programming languages to claim they w…

What is in your list of acceptable languages, and what is your list of unnecessary languages? Is date of creation a factor? Because D was created last century.

So it's over 20 years old yet nobody knows it exists. Doesn't sound very promising. The first time I heard of it was someone who uses it frequently complaining about too many breaking changes in minor updates.

So it's unknown and unreliable. Who gives a crap if it has elegant syntax, it's just another way to write the same stuff. The examples from the article can be done in JS, python, java, c# almost exactly the same way. Slightly different syntax.

Post reply on HN