Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
273 views
in Technique[技术] by (71.8m points)

interop - Using D programming language in a .NET context

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...