[Mono-list] Re: C# -> Binary .. MCS to C++ cross compiler

Miguel de Icaza miguel@ximian.com
23 Oct 2002 00:57:53 -0400


> I was working on a mcs mono to C++ compiler.  This would allow mono to be
> compiled to C++ (not C) code that would be practically indistinguishable to
> a source debugger, and would allow mono to seamlessly integrate with extant
> C++ code.

Although it is possible to modify MCS to generate something like C++,
this will not address the dynamic nature of C# nor will deal with things
like supporting Reflection.

So even if you can compile your code to C++, you will need a runtime. 
In fact, this particular way just happens to be a subset of what can be
supported by things like NGen (Read Zoltan's NGen code to get an idea of
what is involved).

Getting 80% of the way with MCS is relatively trivial, the problem is
the extra 20% which requires careful design, and very careful thinking,
beyond a regular hack attack.