6 ms·
> Have you tried D? I tried D years ago (at least 5 years ago, I think), but I don’t remember experimenting with the C interop. Your explanation sounds intrig
by jay-barronville 2y ago
> Have you tried D?
I tried D years ago (at least 5 years ago, I think), but I don’t remember experimenting with the C interop.
Your explanation sounds intriguing though. And a couple pretty smart folks I respect have talked about D too. So thanks for bringing it up. I’m going to make some time to experiment with it again some time soon.
> Is that as good as Rust?
Franky, although I don’t have firsthand experience with D, your explanation and example make the D C interop experience sound actually better than Rust’s. It seems more similar to Zig.
- brabel 2y agoI think the feature that allows importing c, called "importC", is newer than 5 years. I think they may have "copied" it from Zig :D they definitely are trying to not "fall behind" Zig and keep making the language better. With DMD, you can cross compile just as with Zig, but only to object files as the linker is not multi-platform... so I am experimenting with using Zig's linker to "finish" the job. Unfortunately, Zig is not being able to link Phobos, the D stdlib, for reasons I don't understand yet.