4 ms·
I remember when this paper came out, I tweeted at the author about D's "Better C" mode since he used that very term. It really is a better C, because C is almos
by bachmeier 6y ago
I remember when this paper came out, I tweeted at the author about D's "Better C" mode since he used that very term. It really is a better C, because C is almost a subset of D. You get nice features like array bounds checking, but no runtime, no garbage collector, etc. It's a good choice for those that prefer to stick with C but wish there was a 2021 upgrade.
https://dlang.org/spec/betterc.html https://dlang.org/spec/betterc.html
- ducktective 6y agoWho are the designers/institution behind D and why they have not promoted it as much as newer alternatives?
- bachmeier 6y agohttps://en.wikipedia.org/wiki/Walter_Bright https://en.wikipedia.org/wiki/Walter_Bright https://en.wikipedia.org/wiki/Andrei_Alexandrescu https://en.wikipedia.org/wiki/Andrei_Alexandrescu They've promoted it (holding annual conferences and such) but they don't have Mozilla or Google behind them, so resources are limited. Edit: And here are some blog posts by Walter Bright about D as a Better C. https://dlang.org/blog/2017/08/23/d-as-a-better-c/ https://dlang.org/blog/2017/08/23/d-as-a-better-c/ https://dlang.org/blog/2018/02/07/vanquish-forever-these-bugs-that-blasted-your-kingdom/ https://dlang.org/blog/2018/02/07/vanquish-forever-these-bug... https://dlang.org/blog/2018/06/11/dasbetterc-converting-make-c-to-d/ https://dlang.org/blog/2018/06/11/dasbetterc-converting-make...
- rob74 6y agoWell, Rust doesn't have Mozilla behind them anymore either (ok, they now have a foundation with not only Mozilla, but also Microsoft, Amazon, Google and - whoa! - Huawei as sponsors, so you could argue that's an improvement). And I'm not sure how much Google is really invested in backing Go. But yeah, I guess D looks small in comparison to both...
- mhh__ 6y agoThis goes both ways, but one thing that we need to be louder about as a (D) community is that there are features that these languages (e.g. Rust) make a lot of noise about that Rust has had for years now - e.g. D's interop with C++ is extremely good, to the point where D should be able to catch an exception from C++ and unwind correctly. Another example is the Integers-in-Generics post that hit 300 points, which D has had for years now. There are some rust features that I want in D, but we'll see about that.
- voldacar 6y agoWalter Bright (original creator of D and the D compiler) posts here pretty frequently.
- mhh__ 6y agoWalter might be asleep at the moment; I work for the D foundation if anyone has any probing questions
- c-cube 6y agoIt's only relatively recently that D open source compilers became available. And by that point it felt too much of an incremental improvement over C++ to seriously gain traction, imho. The design also feels dated in places compared to rust (not talking about the borrow checker ; more about the type declaration syntax, not being expression based, no ADTs or pattern matching, etc.)
- pharke 6y agoWhat's the developer experience like in D? I keep looking at it from time to time but haven't taken the time to learn it (even though I've spent time learning a lot of new languages) I was never sure if there was a big enough community around D to make it worthwhile but it seems to have a lot of the features I want.
- bachmeier 6y agoJust for clarity, to keep on the topic of the article: If you compile a D program with the -betterC flag, you give up many features so that your program runs with only the C runtime. It's great for a C programmer not wanting to learn a new language or for being able to make incremental changes to a C codebase while adding things like metaprogramming. If you're satisfied with the experience writing C, you'll probably also be satisfied writing D and compiling with the -betterC flag. As an example, here's a -betterC hello world: https://run.dlang.io/is/TKOBgA https://run.dlang.io/is/TKOBgA Once you move on to other goals (using the whole language, as is usually the case) there are numerous complaints. Some don't think the VS Code plugin is good enough and that sort of thing. Some argue that Dub, the package manager, is not good enough for their needs. I suppose like every language has people that try it and don't like it. It doesn't take much to try it. You can use the online D editor and read the official tutorial. If you like it, you can dig in further to see if it has the ecosystem you need. https://run.dlang.io/ https://run.dlang.io/ http://ddili.org/ders/d.en/index.html http://ddili.org/ders/d.en/index.html
- mhh__ 6y agoPretty Good - everything you actually need is there and working: There are some things we don't have, (say) the automated refactoring story is poor, but that's because the language is designed in such a way that such tools aren't required. D has evolved (until the last few months basically) without any direct corporate backing and yet absolutely stomps quite a few very very well-funded languages from a design perspective (e.g. A template constraint in D is so simple it's one keyword, and you can even do your own error messages as a library and compose things, whereas C++ took almost my entire lifetime to standardise concepts). D exists as a (large) group of very simple language design decisions - for example, we have unitest { /* code here */ } blocks that make writing unit tests much lower friction. We just had our monthly "Beerconf" online conference, and all I can say is that the knowledge per head in the D community is very high.