How to create a concrete reinforcement toolbox with Rhino?

C#, like Visual Basic, produces code in an “intermediate”, or interpreter language, or what Microsoft calls “managed code”. It requires a .Net library to run. C++ produces “machine language”, referred to as “native code”.

Hopefully this gives you some terms to look up if you aren’t yet familiar with them.

Partially correct. C++ in VS by default is doing the same as C# and VB and gets converted into the Intermediate language as well.

Well, yes, I was trying to explain the fundamental difference; i.e.: the main reason why a developer starting to write a new project would choose C++. The fact that it can produce managed code is a very handy thing in a lot of scenarios - especially if an experienced C++ developer needs a managed solution. I guess I forgot that was the default in VS C++.

I’m not finding arguments against C++ now.
The C# Compiler lets you deal with unmanaged code as well. But even managed code is still very fast nowadays and computer specs making the difference almost irrelevant. The C#/IL compiler does a lot of mircooptimizations for you, and differences in performance (language-based) are quite low, at least for compiled languages.
What I’ve heard is that C++ allows you to create very well performing code with ease and clear syntax and C++ has a lot of well performing libraries around, very important arguments for certain types of development.
But the power and freedom you get from C++, also makes it quite hard to master. This is why you often see hybrid solutions, where perfomance critical parts are done in a low level language just being invoked from another higher abstracted language. Basically all important Python libs are written in C/C++ (Numpy/Pyside(QT)/PyTorch/Tensorflow/CV2…) , but the apps around are build in CPython.

1 Like

Hi everyone,

@Tom and @Tim : First thank you for your responses. I have just installed VS. I have considered both options (Python vs C#), and from your last contributions it appears that you both agree that C# is better in the long run (for me the decisive argument is the better documentation), so I will give it a try !

So I will try and do what is indicated in the “Getting Started” section of RhinoCommon SDK : https://developer.rhino3d.com/guides/rhinocommon/

If you have any good documentation to reccomend regading C# and good examples of coding with RhinoCommon SDK I am in.

Tanguy