6 ms·
> It's a mystery why D isn't far more popular than it is. There's no mystery. It's a jack of all trades, master of none. E.g., the virality of the GC makes it
by dataflow 1y ago
> It's a mystery why D isn't far more popular than it is.
There's no mystery. It's a jack of all trades, master of none. E.g., the virality of the GC makes it a non-starter for its primary audience (C/C++ developers). The need to compile and the extra verbosity makes it a bad substitute for scripting like Python. Etc.
Basically, name any large niche you'd expect it to fill and you'll probably find there's a tool already better suited for that niche.
- bachmeier 1y ago> the virality of the GC makes it a non-starter for its primary audience (C/C++ developers) No. If you were to say you need the GC to use all features of the language and standard library, of course, the GC does important things, but to claim a C developer wouldn't be comfortable with it because of the GC is nonsense. Just don't allocate with the GC and use the same mechanisms you'd use with C (and then build on top of them with things like @safe, reference counting, and unique pointers).
- dataflow 1y ago>> the virality of the GC > Just don't allocate with the GC "virality" is not just a word you can ignore.
- bachmeier 1y agoI don't understand. If you're a C programmer and want to avoid the GC, there's nothing to be viral.
- dataflow 1y ago> If you're a C programmer and want to avoid the GC, there's nothing to be viral. What you're suggesting is the moral equivalent of "it's easy to avoid diseases, just avoid contact with those infected", or "it's easy to avoid allergens, just avoid foods you're allergic to", or "it's easy to avoid contamination, just set up a cleanroom", or "it's easy to write deterministic code, just avoid randomness", etc. Yes, there are things that are easy to achieve in the vacuum of outer space, but that's not where most people are interested in living.
- brabel 1y agoCompletely agree after trying it. Anything that may throw an Exception requires GC. There goes 80% of D code you could use. The rest becomes inaccessible for other, similar reasons quite often. Try writing D with @nogc and it takes 10 minutes to understand that. They want to make the situation better but there’s just not enough people to tackle the huge amount of work that requires (I.e. changing most of the stdlib)
- dataflow 1y ago> Try writing D with @nogc and it takes 10 minutes to understand that. Thank you. Yes, exactly. The problems aren't even subtle; it's impossible to miss them if you actually try. I don't recall even finding a reasonable way to concatenate or split strings on the heap and return them without a GC, let alone anything more complicated. It boggles my mind that people repeat the talking point that it's somehow practical to program with @nogc when the most basic operations are so painful. Nobody is going to drool at the idea of spending days/weeks of their lives reinventing nonstandard second-class-citizen counterparts to basic types like strings just to use a new language. > They want to make the situation better but there’s just not enough people to tackle the huge amount of work that requires (I.e. changing most of the stdlib) I don't agree that it's lack of manpower that's the problem -- at least, not yet. I think it's primarily the unwillingness to even admit this is a problem (an existential problem for the language, I think) and confront it instead of denying the reality, and secondarily the inertia and ecosystem around the existing language outside the standard library. It's not like the problem is subtle (like you said, a few minutes of coding makes it painfully obvious) or novel. The language has been out there for over a decade and a half, and people have been asking for no-GC version nearly that long. Yet, at least to the extent I've had the energy to follow it, the response has always been the canned you-can-totally-program-D-without-a-GC denials you see repeated for the millionth time here, or (at best) silence. If this sentiment has changed and I'm unaware of it, that's already significant progress. Maybe the unwillingness to confront reality is due to the lack of manpower and how daunting the problem looks; I'm not sure. But it seems as bright as daylight that D is not going to be successful without solving this problem.
- unclad5968 1y agoIf I'm just coding C except a new syntax, why wouldn't I just stick with C?
- dataflow 1y agoIt's not just new syntax, you get other nice features too.
- zem 1y agoit should at the very least fit the same niche golang does
- dataflow 1y agoI almost mentioned Go as another example of what it doesn't substitute for, but decided to cut off the list. But no, I don't think it fits that niche either. Go has a lot of features D doesn't have. Just off the top of my head: it's very simple, it doesn't have pointer arithmetic (yes, that's a feature here), it performs escape analysis to automatically extend the lifetime of objects that escape the stack frame, etc.
- WalterBright 1y agoD does not allow pointer arithmetic in code marked @safe. D does escape analysis from an alternative direction. If a pointer is qualified with `scope`, the compiler guarantees it does not escape the stack frame.
- dataflow 1y agoI'm well aware of those, and they obviously don't fill the gaps here.
- globular-toast 1y agoWell that shouldn't be a mystery. Golang was marketed by Google.
- WalterBright 1y agoWith D you don't have to use multiple languages, such as mixing Python with C. D is The One Language to Rule Them All. (D's ability to use C code is to make use of existing C code. There's not much point to writing C code to use with D.)
- dataflow 1y ago> D is The One Language to Rule Them All. That's kind of why I said it's the "jack of all trades". It's not a bad language, it just doesn't beat any existing languages I know of in their own niches (hence "master of none"), so few people are going to find it useful to drop any existing languages and use D in lieu of them.
- jibal 1y agoIt's amusing to see someone telling the designer and implementer of a language that he has put decades of effort into that "it's not a bad language".
- tialaramex 1y agoIt's better than the feedback I would have for, to give an example, Bjarne Stroustrup. Bjarne has spent so far as I can tell almost all of his adult life on C++. It's a huge bloated mess, and though there are many other guilty parties I don't think I can even say he was a good influence.
- jibal 1y agoYou and Dataflow seem to have no idea how the real world works.
- WalterBright 1y agoI often hear a lot worse :-) No worries, it doesn't bother me. What pleases me are the people who use D, like it, and tell me they make more money using D because D is much more productive to write code in. D also attracts expert programmers who are very comfortable using the GC when appropriate, stack allocation when appropriate, malloc/free, even ref counting. These are just tools in the toolbox, like I use socket wrenches, end wrenches, box wrenches, crow foot wrenches, pipe wrenches, monkey wrenches, etc. I don't try to use socket wrenches for everything. BTW, the GC makes managing memory in compile time function execution trivial. Something that non-GC languages struggle with.
- GoblinSlayer 1y agoWhen you use many languages, don't you become a jack of all trades, master of none? Also it's not obvious python is good for scripting, bash is better at short scripts, statically typed languages are better at long scripts, and you can't use it in CI yaml scripts. Python is more famous for data science and AI, not for scripting.
- dataflow 1y agoI used "scripting" loosely (Python source files are frequently called Python scripts), I wasn't referring to shell scripts specifically. Feel free to pretend I said Bash or data science or whatever you want. Re: your first sentence: I neither understand the logic nor do I understand how insulting the developer is going to help D succeed here even if the logic was sound.
- GoblinSlayer 1y agoYou handle technology as an emotional being? Well, that's strange. I thought it's more about tradeoffs.
- bravetraveler 1y agoPython is useful for scripts that go beyond strings. For instance: making a series of API calls, parsing/processing/mutating. That's not data science or AI; "more famous" -- ridiculous distinction. Fun fact: Ansible is orchestrated Python. Half your Linux distribution of choice is a pile of Python scripts. It's everywhere.
- GoblinSlayer 1y agoThere's also mercurial, wxpython and embedded python(?). It's niche languages that are exotic.
- p0nce 1y agoThe full quote is: “Jack of all trades master of none, though oftentimes better than master of one.”