News for hackers. Stuff that matters.
Re:Twenty years of C# with Anders Hejlsberg [audio] by binarynate on Thursday February 10, 2022 @05:20PM (#30293513)
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.
Re:Twenty years of C# with Anders Hejlsberg [audio] by DizzyDoo on Thursday February 10, 2022 @05:29PM (#30293620)
It'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/[email protected]/ma...

[2] - https://www.jacksondunstan.com/?s=burst

[3] - https://www.jacksondunstan.com/articles/5251

Re:Twenty years of C# with Anders Hejlsberg [audio] by no_wizard on Thursday February 10, 2022 @07:27PM (#30295037)
I 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
Re:Twenty years of C# with Anders Hejlsberg [audio] by m12k on Thursday February 10, 2022 @06:01PM (#30294006)
It'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++.
Re:Twenty years of C# with Anders Hejlsberg [audio] by naraga on Friday February 11, 2022 @04:31AM (#30299246)
Also, Anders is Dane and Mads Torgersen (current C# lead designer) is Dane
Re:Twenty years of C# with Anders Hejlsberg [audio] by rossnordby on Thursday February 10, 2022 @06:03PM (#30294038)
Notably, 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...
Re:Twenty years of C# with Anders Hejlsberg [audio] by binarynate on Friday February 11, 2022 @01:21AM (#30297727)
Thanks 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.