[fpc-devel] Pascal to Java compiler

Thaddy thaddy at thaddy.com
Thu Nov 27 16:22:27 CET 2008


I wrote this from the perspective of a compiler, not from the 
perspectiev of a framework.
So, I fully agree with your response. It is a more elaborate version - 
with corrections - of what I ment.

Marco van de Voort wrote:
> In our previous episode, Thaddy said:
>   
>> I remember that the Delphi to java bytecode compiler isn't feature 
>> complete. I can't be: it will not be possible to compile any old delphi 
>> program into java byte code for several reasons. But it is possible to 
>> create Java bytecode with a - safe - subset of pascal syntax. It is also 
>> possible to use the same intermediate compiler to compile to .net/mono, 
>> though. It isn't possible to adapt Freepascal to write once compile 
>> anywhere with Java OR .Net. Both these assume restrictions that are 
>> simply not there in native code compilers, so you would have to work 
>> with one lame leg. I hope you realize that.
>>     
>
> Besides the pure language problem, there is also the library problem. Java
> and .NET are more than just a bytecode specification, there are also vast
> standard libraries, and the VCL-alike standard libraries of FPC (classes
> unit etc) are not designed to work on top of Java or .NET classes.
>
> So then you get a problem, what do you do? Keep it compatible with native,
> but a bit alien to the Java or .NET world, or re-spin the libraries in a
> more Java/.NET compatible way, building on top of the base libs. Also for
> this a lot of language extensions must be implemented that might not be
> elegantly back-portable to native, since their philosophies are not the
> same.
>
> But if you do such step, you introduce such a big barrier to actually
> switching between native and bytecode worlds (and probably between .NET and
> Java too) that one must ask what the benefit of long term keeping it in the
> same project really is. Since the native and bytecode targets basically then
> only share the base parser and semantic analysis.
>
> This friction probably lead to the demise of VCL.NET and shared source on
> the Borland side.
>
> As soon as you get the pure language part working, the users will fragment
> over mostly native and mostly bytecode oriented, and the common ground is
> gone.
>
> Forking a project is a big deal, but IMHO warranted in this case. If even
> Borland can't pull it off.....
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.9.10/1815 - Release Date: 27-11-2008 9:02
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3309 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20081127/8a21301a/attachment.bin>


More information about the fpc-devel mailing list