Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Doesn't unity just steal the C# syntax, but actually compiles it on its own? Effectively, it's unrelated to the CLR?

Same for Xamarin?



No and no. I’m no unity expert but I think it is based on Mono, an open source implementation of the CLR and the C# compiler. So it doesn’t "steal" the syntax, it use a compiler made for the language. To put it simply, Mono was (cf infra) the open-JDK of the .net world.

Xamarin is a startup founded and run by people working on Mono.

In the recent years Microsoft opened its new C# compiler (Roslyn) and bought Xamarin with have blurred the lines between the implementations.


Kind of, Mono never was up to speed with what .NET Runtime is capable of, plus before Xamarin got acquired by Microsoft, Unity didn't want to renew their licenses so C# on Unity was stuck into .NET 3.5 world.

They also started their own native code compiler for C#, called IL2CPP, because it compiles MSIL via C++ compiler.

Recently they migrated to .NET 4.6, although the latest version is .NET 4.7.2, due to some Roslyn integration issues.

Additionally they started another project to compile a C# subset (HPC#), with a new compiler named Burst, as a means to start porting some of their C++ modules into C#.


Here's a GDC 2018 talk by a Unity compiler engineer about their new Boost C# compiler:

https://youtu.be/NF6kcNS6U80


Thanks for the details, that’s more complex than I thought it was.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: