3 ms·
I thought it was interesting when Anders mentioned that 30% of C# developers use Unity. Unity doesn't use Microsoft's CoreCLR runtime, but instead uses the Mono
by binarynate 5y ago
I thought it was interesting when Anders mentioned that 30% of C# developers use Unity. Unity doesn't use Microsoft's CoreCLR runtime, but instead uses the Mono runtime or an AOT compiler Unity created called IL2CPP, which converts IL code generated by the C# compiler to C++ that gets compiled to native code. One of the reasons for this is that CoreCLR supports Windows, macOS and Linux, whereas Mono and IL2CPP together support every platform, including consoles. Anyway, it's interesting to me that a significant number of developers are using C# but are using a runtime other than Microsoft's CoreCLR runtime.
- DizzyDoo 5y agoIt's worth mentioning that there's now a third way C# is utilised in Unity which is via their new 'Burst' compiler, part of their wider move to an Entity Component System they've called DOTS[1]. It supports a subset of C# that gets compiled into memory safe jobs that can run safely on and spread across different threads. I'm using the Burst compiler + jobs in my full-time game project and the performance is seriously good for whenever you just need to process a lot of data. You can use Burst with both Mono and IL2CPP script modes. The go-to deep dive on how DOTS/Burst works is pretty much everything Jackson Dunstan has ever written on the matter [2] but specifically the article that digs into how IL2CPP calls Burst is interesting.[3] [1] - https://docs.unity3d.com/Packages/com.unity.entities@0.17/manual/index.html https://docs.unity3d.com/Packages/com.unity.entities@0.17/ma... [2] - https://www.jacksondunstan.com/?s=burst https://www.jacksondunstan.com/?s=burst [3] - https://www.jacksondunstan.com/articles/5251 https://www.jacksondunstan.com/articles/5251
- no_wizard 5y agoI have to say, I wonder if this could be augmented into more general applications that need concurrency or parallelism, since this sounds like an optimal way to make realtime or semi real time systems, at least on the surface
- m12k 5y agoIt's also a bit of a curious coincidence that it's a company founded in Denmark, Unity, transpiling a language invented by a Dane, C#, into another language invented by a Dane, C++.
- naraga 5y agoAlso, Anders is Dane and Mads Torgersen (current C# lead designer) is Dane
- rossnordby 5y agoNotably, there's some movement regarding the runtime in Unity; it may eventually hop over to CoreCLR (for supported platforms): https://forum.unity.com/threads/unity-future-net-development-status.1092205/page-12#post-7878865 https://forum.unity.com/threads/unity-future-net-development...
- binarynate 5y agoThanks for linking to that! It's been a while since I looked at that forum thread, so I didn't realize that support for CoreCLR is already in the works.