this post was submitted on 30 Jul 2023
62 points (91.9% liked)

Programming

17398 readers
94 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

I've never used D but this really makes me want to give it a shot. Did anyone try it, and would you recommend using it?

top 23 comments
sorted by: hot top controversial new old
[–] glad_cat@lemmy.sdf.org 31 points 1 year ago* (last edited 1 year ago) (2 children)

I like the idea of the D programming language but I think I'll never use it:

  • There were issues with multiple compilers in the past and I don't know if it's solved.
  • I can do the same in Python.
  • No companies I know use it, which means it would not be useful for me. I'm mostly looking for C++20 or Rust jobs, I wouldn't know where to find D jobs.
  • D was supposed to be an alternative to Java or C++, but those languages have moved fast in the past few years. C++ is easier than ever and still very powerful, Rust exists if I want safety and low-level simplicity, Kotlin is there and it's fast too. I don't know where D fits nowadays and which problem it's trying to solve.

The language looks nice, but it feels like it's in a weird position around all the other languages.

[–] gnus_migrate@programming.dev 6 points 1 year ago* (last edited 1 year ago)

DMD is the reference implementation as far as I know, so I don't think they have the same issue that C and C++ have with regards to needing to have a standard that pleases everyone. I agree that it has an issue positioning itself relative to other languages, but to me D is the good kind of boring. It has most of what you need, there is very little that is surprising in it, if you find yourself needing to do something, probably D has an easy-ish way of doing it.

[–] orangeboats@lemmy.world 2 points 1 year ago

I don't know where D fits nowadays and which problem it's trying to solve.

My experience has been similar - it's hard to categorize the language.

As a low-level system language like C, C++, Rust, Zig? The garbage collector makes it a hard sell to other people, even though one can opt out of it.

As a higher-level application language like Java and Go? D frequently gives me a "low-level language" feel, but I am not sure why.

As a scripting language? I feel like its type system works against the rapid-prototyping coding style commonly seen in scripts.

[–] ImpossibleRubiksCube@programming.dev 12 points 1 year ago (1 children)

D is an incredibly fun language with a reasonable syntax and considerable support for a wide variety of programming paradigms (procedural, object oriented, functional...), while maintaining binary interface compatibility with C and C++. That makes it extremely versatile.

It is the perfect pet language. The only reason it was never more widely adopted is the quizzical early decision by its makers (Mars) to keep the reference compiler closed source. There an open source compiler too, and it's good, but it's effectively black boxing. So, pet language is where the buck stopped, for better or worse.

[–] jim_stark@programming.dev 6 points 1 year ago (2 children)

reference compiler closed source

Is it still closed source? What is the reason?!

[–] cmeerw@programming.dev 6 points 1 year ago (1 children)

I think it is Open Source now, see https://github.com/dlang/dmd

AFAIK the backend is based on the Zortech C/C++ backend and Walter Bright had to get permission from Symantec to relicence as Open Source.

[–] jim_stark@programming.dev 1 points 1 year ago

I see, makes sense.

[–] ImpossibleRubiksCube@programming.dev 2 points 1 year ago (1 children)

No idea what the reason was, likely misunderstanding from upper management. I'm not sure going open would make much of a difference at this point

[–] jim_stark@programming.dev 3 points 1 year ago (1 children)

Yeah, C# and Rust, in their own ways, pretty much covered what D lang set out to do.

[–] ImpossibleRubiksCube@programming.dev 1 points 1 year ago* (last edited 1 year ago)

C# was the solution, we didn't yet know that we needed, to Java.

[–] GnomeKat@lemmy.blahaj.zone 10 points 1 year ago

I been using D for like... 10 years or something. The biggest problem D faces and has always faced is the leadership's lack of direction. If you lurk their forums you know what I mean.

I still hope for a D3 one day where the language is redesigned from the ground up, not that D2 is bad but it has a lot of features that never really matured properly. I really truly believe a redesign could clean up all the rougher parts and revitalize interest in the language but my hope will probably never get fulfilled.

Still use it tho..

[–] TheCee@programming.dev 10 points 1 year ago

Between the lack of null safety (which really shouldn't have been a thing since the 90s), the incapacity in community management and lack of focus of the core devs mentioned by Gnome Kat and glad_cat, I tried Dlang in roughly 2015. It was an OKish experience for trivial tasks, but I noticed the amount of churn in dub packages.

TL;DR: I would not. And for the same reasons, I wouldn't recommend Scala either.

[–] jim_stark@programming.dev 9 points 1 year ago

FYI: There is a Linux distro that bets heavily on D Lang, Serpent OS.

[–] ZILtoid1991@kbin.social 8 points 1 year ago

I'm a D developer, and D is so far the best language I've tried. It has very powerful meta programming capabilities, looks much nicer than Rust, and supports multiple paradigms. My main gripe is the lack of libraries, but it's pretty easy to either write your own, or a binding to a C or C++ one. I wrote a couple of my own libraries, and I'm currently writing my own replacement for SDL, called iota, and I aim it to be a smaller version of it (e.g. not including things into it that already exist in the Runtime and Phobos).

I really like multi paradigm programming, as most programming paradigms are good at a select few things, while over-complicate others.

[–] XTL@sopuli.xyz 2 points 1 year ago (1 children)

If it needs installing and maintaining yet another runtime, it's not worth it, IMO.

[–] EinfachUnersetzlich@lemm.ee 6 points 1 year ago (1 children)

D is compiled, no runtime needed.

[–] XTL@sopuli.xyz 1 points 1 year ago

That's promising. Not so much a scripting language, but I know the sentiment. It just needs to beat rust in that case

[–] BrightCandle@lemmy.world 2 points 1 year ago (1 children)

The Witcher inspired TV series, it's not actually a show based on the books.

[–] Blaze@sopuli.xyz 7 points 1 year ago (1 children)
[–] BrightCandle@lemmy.world 5 points 1 year ago* (last edited 1 year ago) (1 children)

I am not even subbed into D at all and I was going through my subscriptions, its meant to be in television. This is a bug in lemmy or the app. A very concerning bug.

[–] Blaze@sopuli.xyz 4 points 1 year ago

Indeed, feel free to report it depending on which interface you were using

[–] exapsy@programming.dev -3 points 1 year ago (1 children)

I saw esoterics and heavily opiniated jargon such as .each!writeln; and immediately said ... "fuck this". I don't wanna learn another shitty scripting language that thinks it's cool because it created its own esoteric opiniated jargon. A language that isn't even POSIX standard. Thank you.

Buddy, there are a heck of a lot of unique non-POSIX languages out there. Are you sure you any being a little knee-jerk here? Remedy Entertainment and Netflix both used it internally for a very long time.