D
D
Dmitry2011-10-22 23:21:03
Programming
Dmitry, 2011-10-22 23:21:03

What COM-compatible language would you recommend for writing a small plugin?

I would like to write a plug-in for SolidWorks. The entire API is available through either COM or PIA. Accordingly, I want to understand which language is best suited.
Options:
* D - I like the language, it seems that COM should “eat” correctly, but you will have to write your own CComPtr analogues or something like that.
* Intel C++ is a poor language, but very frisky libraries and the best toolset for development and profiling. (Don't offer Microsoft C++ or C++/CLI - don't care.)
* C# - good for UI but not good for performance at all, if you use it, you still have to use it in conjunction with Intel C++ via P/Invoke.
In general, any comments are welcome!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Weageoo, 2011-10-23
@Weageoo

Intel C ++ is a compiler, not a language, it will just result in machine code more optimized for their processors.
I disagree that C++ is squalor.
After all, C# makes it very easy to connect COM components, and works with them almost like with its own assemblies.
So, I would probably choose C++ if you need a fast independent plugin, and C# if you need to make the plugin itself faster. And since, as far as I understand, you are profiling in C #, then this is the most suitable option. Well, if wrappers are written for a C++ lib, then I would prefer an intermediate C++/CLI lib, because there are too many factors to consider when writing a wrapper in C#, and it's not always easy, for example, if you want to pass an array of strings.
I don't know about D. Judging by the description in the wiki, it fits well, but whether COM will eat is a question. A quick google search didn't turn up an example. Maybe you should start writing in D, if not weak difficulties suddenly appear, switch to another.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question