Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any advantage to using C++/CLI over either standard C++ or C#?

I'm not seeing any real advantages, other than the fact that you have a C++ syntax, and with it, things like pointers and destructors.

like image 474
Thomas Owens Avatar asked Nov 17 '08 23:11

Thomas Owens


1 Answers

If you're talking about why you would use C++/CLI over C#, I think the main reasons are that:

  1. it might be more natural for C++ developers (though I think this is probably not true)
  2. C++/CLI has very nice capabilities for bridging the native and managed environments (using the 'IJW' - It Just Works - technology)

I think that Herb Sutter probably gives the best overview:

A Design Rationale for C++/CLI

If you want to know why you might want to use native C++ over C#/.NET, this boils down to why you would want a managed environment (safety, easier development) over native code (absolute control, possibly speed advantages). There are arguments for each, and the answer really depends on what you want to develop and what your market might be.

like image 99
Michael Burr Avatar answered Sep 28 '22 02:09

Michael Burr