[fpc-devel] Pascal to Java compiler

Thaddy thaddy at thaddy.nl
Fri Nov 28 10:55:00 CET 2008


Michael Schnell wrote:
>
>> - One should not attempt to implement Java or C# language constructs in
>>   Pascal.
>>   
> Oxygene / Delphi Prism seems to do this very successfully. But of 
> course the compatibility to the existing code base is limited.
>
Well, the first remark is indeed questionable. As you remark: Prism is 
rather successful doing just that. The problem is the confusion between 
frameworks (essentially libraries), a language and a compiler.
There's no reason at all that current objectpascal implementations like 
Delphi or FPC cannot implement Java or C# constructs. Although it might 
need a different memorymanager and a separate framework for native code: 
f.e. the Boehm memory manager, which does a good job, and/or extensive 
use of interfaces. For IL code this is covered by the VM (both Java VM 
and .Net) by the way, so there's no problem there too. The main problem 
lies in the frameworks. That's what makes it difficult. Another problem 
lies in multipass versus single pass compilation. As some here 
explained, there's more to it. But not impossible and it probably needs 
branching. The Delphi Java bytecode compiler comes without any framework 
by the way,although classes are supported. You rely on the Java framework.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: multipart/alternative
Size: 1 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20081128/9586b47e/attachment.bin>
-------------- next part --------------

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.9.11/1816 - Release Date: 27-11-2008 19:53


More information about the fpc-devel mailing list