[OT] .NET vs. Java backend (was: Re: [fpc-devel] FPC Branches)

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jul 12 22:53:15 CEST 2010


Alexsander Rosa wrote on Mon, 12 Jul 2010:

> Java tries to be "write once, run everywhere", while .NET is more like
> "write in any language, as long as you run it at our operating system".
> Forget Mono, it's doomed to always play catch with Microsoft's
> implementation due to technical and legal issues.

There are two "levels" of .NET: on the one hand you have the bytecode  
format (CIL = Common Interface Language), and on the other hand you  
have runtime and its frameworks frameworks (CLI = Common Language  
Infrastructure).

A ".NET backend" would mean generating CIL bytecode as far as the  
compiler is concerned. Conceptually, this would be not very different  
to generating, e.g., LLVM byte code. It's just an intermediate format  
that can be fed into other tools and either be used in a JIT  
environment, or be statically compiled down to machine code (there is  
e.g. a GCC frontend that reads CIL, and subsequently can in principle  
generate machine code for any architecture supported by GCC -- but  
before anyone gets any dreams: this would still also require at least  
some rudimentary support for that architecture in FPC).

The advantage of generating such an intermediate format is that it  
lets you take advantage of many tools that have been written by other  
people if you wish to do so.

Supporting the CLI (like Delpi.NET/Delphi Prism) would additionally  
require adding support for an extra "operating system" to the compiler  
and the RTL, namely the "CLI platform". It's this latter part where  
Mono is indeed generally about one generation behind the latest  
Microsoft version.


Jonas

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the fpc-devel mailing list