I keep asking me the same question and I would like to understand what is going on…
Unity’s core is written in C++, and users have the possibility to add functionalities which are coded in C#, compiled and then loaded in the engine.
C# is a very good language in terms of productivity, there is not arguing about that…
But why, god why, using compiled libraries rather and just embed an interpreter in the C++, such as python, lua, javascript V8, go, or whatever ?
It would make so much more sense, one would not need to care about portability of the added functionalities because the script would be interpreted directly in the compiled C++ app…
As long as the core app runs on the platform the script would run too, there would be no need for il2cpp insanity…
Also it would be much easier to reload changes, since no assemblies would have to be reloaded, just the scripts would have to be reloaded…which means that we could make changes in games that are already compiled…
I understand that performance might be an issue, but where to we stand for with old mono performance compared to lets say last generation V8 javascript engine…
So the only reason to use C# instead, except for performance reasons (that would need to be benchmarked), would be the extensive support for third party libraries, however due to the outdated .NET profile most of the interesting libraries that I’d like to use are not available anyways…
Could somebody explain me what happened in their mind for making such decision ?
This is not a hate message, I am actually interested in game engine development, and I would like to know what would have been the best approach if they had a chance to start over again.