Hacker News new | ask | show | jobs
by rajeevk 4089 days ago
Just curious.. Why cant the mono team replaces almost whole of their codebase with the code Microsoft open sourced? Is there anything stopping them to do that? Maybe licensing issues?
4 comments

First, the code Microsoft released does not build and run on all platforms. They promised Linux support, and are working on it now in the open, but it's not there yet. So Mono can't just adopt the Microsoft .NET VM without losing features.

Second, Microsoft is open-sourcing their whole VM - JIT, GC, as well as compiler and libraries. Compiler and library code is already being utilized by Mono, and more all the time. However, Mono doesn't even have plans to replace their JIT or GC with .NET's, as far as I know (and the Trello board linked to in the article seems consistent with that).

Could Mono do that (once Microsoft's builds on Linux and other platforms Mono needs)? Yes in theory, but it would mean abandoning all the massive amount of work they put into their VM over many years. I don't know whether it would be rational or not to do so.

Licensing isn't a problem for Mono to use Microsoft code. However, Mono's runtime is LGPL licensed, and this has been a source of revenue for them (people pay Xamarin for licenses for platforms like consoles where LGPL is a problem). So to replace the Mono VM with Microsoft's could be a step back there.

I can't speak for mono, but converging makes sense where it makes sense -- if mono has a solid implementation of something they consider core and the MS implementation isn't trivial to port, I don't see a good reason to port it.
Because it is a lot of work and takes time to integrate the pieces MS open sourced :)

There are also a few cases where the code needs to be tweaked so it works correctly on Mono and the platforms it runs on.

We are working on replacing those parts that we can.

But there are several issues:

* reference source code not being portable and not working on Unix. * complex dependencies between the portable and non portable pieces * some bits were only released recently, and without those it was not possible to port other chunks * dynamic happy code high prevents some code from being adopted as Mono can be used as a full static compiler on iOS, Xbox and Playstation.

So as time permits we will bring those over.

We also plan on supporting the "core" model where our contributions will flow back upstream.

But "core" is still a bit undefined

You know that Mono is cross-platform and Microsoft code only runs in Windows right?
Is this true?
Not anymore. The .NET Core has been ported to OS X and Linux already. It still has a long way to go in stability though.
The OP is talking about the reference sources, not .NET Core (which is an unfinished effort, btw).
NetFx core contains many of the same things that NetFx desktop does, and everything in Netfx Core is required to be cross-platform, so I would say that many, if not most, pieces of the framework should be portable directly to mono.
Yes, especially for the IO code, which is C# code p/invoking into Windows kernel APIs.

Mono project has been mainly pulling Microsoft's code that is managed, which is the one that should run in any OS unmodified.

Yes. Its literally the point of the Mono project.