3 ms·
Yes: https://dlang.org/spec/importc.html https://dlang.org/spec/importc.html The D compiler(s), as Zig, can be used to compile C code... and D code can import
by brabel 3y ago
Yes: https://dlang.org/spec/importc.html https://dlang.org/spec/importc.html
The D compiler(s), as Zig, can be used to compile C code... and D code can import C files as if they were D modules (as in Zig, there are some special types to represent C strings and other types that are not exactly the same).
- giancarlostoro 3y agoThanks for that! I'm a big fan of D, as someone who primarily codes in C# and Python. I really wish a big company would take on D in a serious way that puts it on the map significantly. It is an underrated language in my opinion.
- brabel 3y agoAbsolutely. It was way ahead of its time. And it's improving, albeit slowly. With stuff like @safe, @nogc, pure, betterC[1], and its unmatched metaprogramming, it's a more modern language than most of the newer languages popping up. [1] https://dlang.org/blog/2017/08/23/d-as-a-better-c/ https://dlang.org/blog/2017/08/23/d-as-a-better-c/
- giancarlostoro 3y agoIf someone would hire me to use it, I would take the offer in a heartbeat. Until then I just play with it to test out language features and check it out. I wanted to like Vibe.d but I wanted something a little more batteries included. I might check out the Hunt Framework though.