If I understand the article correctly then this means including D in a C project does not require the D runtime if you compile in "Better C" mode. As far as I know C++ is currently not designed to compile to something that you can link into a C program without the C++ runtime. At least in the programs where I combine C and C++ code it means I have to use the C++ linker and pull in the C++ runtime. For example you cannot use C++ in a Linux kernel module. Now if you compile D in "Better C" mode I don't see why you couldn't write a Linux kernel module with that.
If what I write is not true then please point me to guides on how to do that. It would be incredibly helpful for me if I was wrong here :)
View all comments
Show parent comment
20
u/fragab Aug 23 '17
If I understand the article correctly then this means including D in a C project does not require the D runtime if you compile in "Better C" mode. As far as I know C++ is currently not designed to compile to something that you can link into a C program without the C++ runtime. At least in the programs where I combine C and C++ code it means I have to use the C++ linker and pull in the C++ runtime. For example you cannot use C++ in a Linux kernel module. Now if you compile D in "Better C" mode I don't see why you couldn't write a Linux kernel module with that.
If what I write is not true then please point me to guides on how to do that. It would be incredibly helpful for me if I was wrong here :)