Hacker Newsnew | past | comments | ask | show | jobs | submit | Fire-Dragon-DoL's commentslogin

Why D sees low adoption?

I think in many ways D was just too ahead of it's time; Packaging the same feature set and abstraction level of C++ in much cleaner and saner package wasn't really seen at valuable at that time. I think that if D were to be "re-release today" with a lighter syntax, and some coporate backing a-la GO/swift/typescript/carbon; It would find quite a bit of success.

Also wasn't the D compiler proprietary and a paid product for a long time after its initial release?

No judgement against trying to monetize valuable work, but in this day and nearly everyone expects free and OSS compilers/interpreters and core tooling.


> Also wasn't the D compiler proprietary and a paid product for a long time after its initial release?

The backend for the DMD compiler was not fully open source for a number of years. That's because Symantec owned some of the code and they were not willing to let it be relicensed. They did allow that in 2017. It was never a paid product AFAIK.

Overall, that was beneficial to the D community. The GDC backend has always been open, and for some time has been part of GCC. The LDC backend was developed to use LLVM. It's possible that there would not have been motivation for those projects if DMD's backend had been open from the start. DMD compiles fast but the performance is not competitive with the other compilers if you're working on something that needs to push the CPU to its limits.


I'm only able to work on the DMD backend now and then, and so it has fallen behind compilers with a small army working solely on a backend.

Sadly, the number of people nerdly enough to want to work on a code generator is very, very small. Me, I find it quite enjoyable.

I cannot even think of anyone who wrote a full stack compiler these days.


> Why D sees low adoption?

Most components of the D standard library (Phobos) use garbage collection by default (when I last checked). This unfortunately removes it as a contender in the same space as Zig and Rust. And once you move to the GC space, there are a truckload of GC languages - it is the non-GC ones that are rare.

IMHO stdlib GC was one of the major barriers stopping D in the system programming space.


We could do a better job at marketing

I really like D and want to use D instead of Zig if I can...

But it's difficult to do so! Nothing to do with marketing in my case, at least. The reasons are :

* `dub` is badly documented and does dumb things like including test code in the generated binary.

* `serve-d` is terrible. It can't handle even my little hello world programs - either crashes or consumes 100% CPU until I manually kill it.

* MacOS support sucks. All the time I have problems: the linker didn't work for years (fixed now). Immediate segmentation faults currently (fixed in nightly AFAIK). C code using the new flat128 doesn't compile (I think it was fixed already?). Just constant frustration.

* Too many features, many broken. It has an experimental borrow-checking feature, I tried to use it but it's largely undocumented. People in the Forum told me to that feature is completely unfinished. It has an allocators package as well, but no idea how I can make use of those like I would in Zig. Would love to see a well written post about that.

Using D in betterC mode is what I am most interested about exactly because it looks more like Zig and C than Java - and performs much better. But currently, that means forgetting about Phobos, the standard library, as that's written exclusively with GC and Exceptions in mind. Maybe that's ok as you can just use all C libraries you want, but would be nice to have some D conveniences to make that worthwhile.

Apart from that, I completely agree that D's comptime and metaprogramming is the best I've seen in any language (except for Lisp of course). All I need to keep using D is much better tooling and clarification about what parts of the language are "half-baked" (especially around DIP1000) and which parts are stable - perhaps "editions" will give us that, will check it out when it's ready. Oh and also top-notch MacOS support... I know that's a moving target but even Zig manages to handle that just fine, why not D?!


Don't use betterC as a global @nogc attribute. This flag does more than just remove the garbage collector and adds extra checks that can sometimes be overly restrictive. If writing GC-free code is important and compiler assistance is really needed, then add @nogc: at the top of every file. But even that is a bit extreme because the @nogc attribute is just a hint to the compiler, telling it to check that called functions also carry that hint. It is not essential for writing GC-free code.

My library for example is not using the GC, but I don't put @nogc on every function because it does not make sense. Here is the link to the library: https://github.com/Kapendev/joka


> Don't use betterC as a global @nogc attribute.

Well I am not, but thanks.


> Using D in betterC mode is what I am most interested about

Well you will. It's a common mistake new D users do.


The borrow checker is there as experimental, it is not an official part of the language. It is unfinished due to lack of interest in it by the D community.

I don't understand the special purpose behind Zig's allocators. It's just an interface. I make custom allocators in D all the time, it's trivial.

Dip1000 is also an experimental feature and is not part of the core language.

On a more pragmatic note, D has a notion of "sinks", aka output ranges. They provide a simple interface that accepts input, which is appended to the output range. Since the user of the sink has no idea what the sink is doing, just that it accepts input. This is a fun and very practical way to move the choice of how to allocate memory to the caller rather than the callee.

gdc and ldc offer top notch D support for the Mac.


> gdc and ldc offer top notch D support for the Mac.

Have you tried using D on Mac? That's almost impossible to do!! You get a segmentation fault immediately when using VS Code because it wants to download its own DCD and that's apparently compiled with DMD?? Everything that gets downloaded in binary doesn't work on MacOS. I only managed to get it working on emacs after building DCD locally with LDC AND making sure emacs does not try to use anything else. But even then, as I said, serve-d barely works (not sure if that's MacOS-specific). D has the worst MacOS experience of several dozen languages I've tried. Even FORTH just works, but D just does not.


BTW, if a language isn't trying out new ideas, it isn't progressing.

I think it would be helpful to make it clearer what's experimental and what's not. Is the `in` keyword experimental? How about `scope`? There's just a minor note in the docs (https://dlang.org/spec/attribute.html#scope) saying "The -preview=dip1000 switch must also be enabled.". That's really not making it clear if that's an experimental feature, it sounds to me that using the preview flag just does additional checks, but that implies `scope` is NOT experimental?! Which is it?

Build the “killer app” that the audience wants and needs and where D is the best lang to do it and justify the investment in learning yet another lang. I have no idea of what that is and nobody knows, it’s the universal problem of any product/lang/tech. Right place at the right time I guess

A killer app can be built in any language.

Of course it can, but different killer apps for a different crowd. A missile tracking system wouldn't be the kind of application to do in PHP. Wrong app, wrong crowd.

I'm aware of D since it's inception more or less but don't know it very well. I would say D lacks a "bombastic" feature and maybe that's both the reason is not used more but also why is such a good language.

It's not "memory safe" like Rust, yes it's fast but so is C/C++, it doesn't have the "massive parallelism/ always-on" robustness like Erlang. It has a bit of everything which is good and bad.

Being a mid all-arounder is OK in my book, perhaps it's more a matter of some "post-AI" tech startup adopt it and get massive or famous, like Ruby because of the Web 2.0 era or Erlang with the Whatsapp thing.

Maybe D is good the way it is and will always be there.


D doesn't have a bombastic or killer feature. What it has is elegance. It simplifies things, and smooths out the ugly stuff. You don't have to worry if your char is signed or unsigned, or how many bits are in an int, or whether to use dot or arrow, or remember to make your destructor virtual, and on and on.

It's a more memory safe language than C/C++, no need to worry about forward references, strong encapsulation, simple modules, and so on.

And let's face it - the C preprocessor is an abomination in modern languages, why does it persist?


In part, the compiler wasn't fully FOSS until 2017.

The gdc and ldc compilers were fully FOSS around 2007.

We were able to get dmd's backend license fixed in 2017.


Ah, I stand corrected!

Good question, but I don't think this is the place for that conversation :) And I say that as a Dlang fan :)

Why would a comment suggesting to use D not be the place to have a conversation for why D doesn't see adoption?

You and Walter could do that, but this post is about some cool devs and their cool Zig project.

The title is "Why we built Lightpanda in Zig", i.e. language selection criteria. Comparing it with D is on topic.

Absolutely. Rust is the only language that's allowed to derail HN programming threads.

too many features. tryhard vibe

We're implementing "editions" in order to remove some features that don't deliver enough value.

how is the community going these days ? stable ? growing ?

I'm not sure if you are joking around the sound of the brand name, or complaining about the actual brand

You really persevered!

Like everybody said, I would have dropped this. My only concern is if they send the 24$ to collection and it affects your credit score


Would it be possible to have electron as an OS package (so, updated) and Tauri use such package on Linux?

What are the technical limitations for this? I honestly know very little about webviews on linux.


Given the 100% on things that can only happen to female bodies, I'm surprised there is no counterpart for stuff that can happen only to the male body, like torsion of testicles. Maybe there is no dedicated code for that?

What's are the differences supposed to be,between male and female? Genuine question

Inherently? I'd say almost none except for the obvious physical ones and their higher order effects.

Culturally there's a lot of differences that won't be patched for generations, social expectations can come from parenting and/or environment, including their society, interactions between genders shaped by those cultural differences from an early age, so on and so forth. Such expectations shape their worldview and place in it, males being told to be tough, not be "a sissy", being shaped into clamming up emotionally. Females being told they can't achieve things solely due to their gender, having to learn to be guarded against potential male aggression, etc.

There's just too much to even start enumerating in a comment but it boils down to cultural expectations from early age, and how those shape people into gendered behaviours as a reaction, not only from the expectations but also the feedbacks happening across gendered higher order effects of those expectations.


Well but the physical difference must account for some natural social differences, my naive thinking is: other animals do act like that.

A simple example is that I can lift my wife's body but she cannot lift mine. Wouldn't that affect our social behavior in some form? My thinking is going to how other animals have different behavior based on sex


We're entering the treacherous path of determining nature vs nurture, other animals act like that but we're also not like other animals, there might be biological reasons to account for some baseline differences while the exaggeration of those traits can also be mostly cultural.

Reducing the comparison to other animals don't really make sense since our societies are many orders of magnitude more complex than other animals, e.g.: the fact of being physically stronger don't explain why until some 100-150 years ago women were considered less intelligent and unsuitable for intellectual work compared to men.

There will be different behaviours due to biological differences, it's just not possible to reduce the vast range of gendered pigeon holing into that, culture is a much higher drive of those, and is empirically visible in societies that moved away from traditionalist views of genders.

Could it be that at some point the biological sex differences sown the gendered culture? I can see that, doesn't mean the perpetuation of it in modern times is due to physical/biological differences.


My son wants to be female because every super hero that's interesting to him, it's female (he is 4). We learned to coast with this, but I did complain about the lack of cool male characters for young kids: the female ones seems to be better curated and more abundant

>My son wants to be female

That's the plan


I actually want him to not differentiate between the two. I find concerning that he distinguishes female as "being better".

Now of course he has a bigger sister he deeply loves and that's probably a big part of the deal


May I remind you that:

You don't need marriage to have kids,you don't need marriage to love another person, you don't need marriage to live with a partner and you don't need marriage to have a fulfilling social life.

The purpose of marriage is economic, so it's not necessary to achieve anything social. It is useful when you want protect your partner and kids from sudden death or disability, which should come AFTER the love/social part.

I am not married, I have 2 kids, been with my "wife" (partner?) for 15 years.

In Canada we are considered like married though, economically speaking.


Looking forward linux android and windows versions!

Just a heads up, the female brain changes are reverted 1 year after giving birth (that's what the health professionals told us). They also discovered that the male brain changes too.

I felt way more empathetic during the first year my son and my daughter were born, but I feel like I lost that part of me. I kinda miss it


Just practice it.

I realize that sounds silly but it really does work. A lot of emotional behavior is muscle like and setting aside intentional practice will lead to longterm change.

1. Set a trigger to engage in the practice like "When I hang out with my kids immediately after the work day"

2. Do the practice. Try to be empathetic to your kids small daily issues. At first, like all newish things this will feel silly but over time it will feel natural.

Obviously try to be genuine. If your kids plight of someone snatching their favorite toy or whatever doesn't move you, don't force it. Just try to practice visualizing yourself in their place. Don't go "fake empathetic kid tone".


I agree, it makes sense. The thing that changed is my initial emotion: frustration because of expectations, then I think about it and realize my expectation is wrong and usually apologize.

While during their first year, my initial reaction was usually the correct one. I felt I could "read" them better.


Your kids are also growing, espressing much more complex emotions.

You have the right goal in your focus, you'll get it with time and practice.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: