3 ms·
Zig and D comes at it from different ends. With D, it feels like the C replacement aspect of it is an afterthought, an add-on (I don't remember it being a big f
by audunw 5y ago
Zig and D comes at it from different ends. With D, it feels like the C replacement aspect of it is an afterthought, an add-on (I don't remember it being a big focus at all when I used it).
Zig aims to be a C replacement from the start, including being a much better toolchain for cross-compiling C code than any other C compiler.
For embedded development, which is what is relevant to me, I never found D a good option. If that has changed they need to work on the marketing.
As an object-oriented garbage collected language with various nice features, I don't see what sets it significantly apart from C# anymore. Well, you can compile proper binaries. But dotnet core interpreters seems to be spreading on our Linux boxes, so then being able to run the same .exe in Linux and Windows is actually a nice thing. Then again I'm not in the market for such a language, so I probably shouldn't comment.
- Shadonototra 5y agoZig aims to be a total C replacement D is a natural evolution of C, fixes its issues (bounds checking and use after free for example), and adds some niceties that makes it pragmatic and polyvalent on top of a solid alternative to MACROs and metaprogramming capabilities You can do native system development, embedded development, high-level tasks thanks to the optional GC and it can also becomes a scripting language Something you can't have with Zig, but that's not its goal anyways Also D is one of the rare languages that maintains its own backend, its own compiler (with optimizations available!) and a community that grows organically without needing major corporations support, it is a true labor of love, and it still gets new features today (ImportC) Why i stick with D? because of all of the above! it's an unmatched language, that compiles code SUPER FAST! .. and the syntax remains similar to C/C++; no need to learn new syntax gymnastic
- Tozen 5y agoI get the impression that D has languished because it never placed itself as a language good for application development. In contrast, look where Pascal/Object Pascal (Delphi) went. When Pascal/Object Pascal got nudged out by C/C++ in system and embedded development, despite being and still is a strong alternative, it made itself useful in application development. IDE (Delphi & Lazarus), GUI framework (VCL and LCL), multi-OS apps, etc... It found a place to flourish, and is still being championed by various companies and taught in various school systems. Where with D, it seems to just be sitting in a corner, waiting to be noticed as a C++ replacement. But, people are not checking for D and hearing little about it. There is a long list of interesting languages, but if people don't see an almost immediate ROI for learning them, they will just sit and collect dust. Even if a language gets a bit of publicity, it still takes luck, timing, or corporate interest to move up the ranks.