Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using D programming language in a .NET context

Tags:

.net

interop

d

I'm curious: has anyone used D together with .NET languages? Is that even possible? What kind of stuff is easier/makes sense to do in D that's hard to do in, say, C++/CLI?

like image 309
Dmitri Nesteruk Avatar asked Feb 11 '09 22:02

Dmitri Nesteruk


1 Answers

Using D together with .NET is very possible. The reason:

  • .NET is able to import unmanaged C libraries (.dll's which export C functions) using the dllImport attribute.
  • D is able to export C functions. using the export and extern (C) attributes

So the considering the technicalities, it's completely possible.

With regards to what D makes easier than C++, the answer is fairly easy: "Everything". In a sense, D is really just a copy of C++ with just about everything done simpler. Sure that's only a half story, but reasonably true.

like image 146
Zuu Avatar answered Oct 27 '22 00:10

Zuu