Re: Java to Python tranlation (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
6 Feb 2007 16:06:56 -0500

          From comp.compilers

Related articles
Java to Python tranlation (root) (2007-02-05)
Re: Java to Python tranlation (2007-02-06)
Re: Java to Python tranlation (Robert Brown) (2007-02-16)
| List of all articles for this month |

From: (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: 6 Feb 2007 16:06:56 -0500
Organization: Department of Computer Science, University of Copenhagen
References: 07-02-013
Keywords: translator
Posted-Date: 06 Feb 2007 16:06:55 EST

root <> writes:

> I'm interested to the complementar problem:
> from Python to Java translation.

One major problem going this way is that Python is dynamically typed
where Java is statically typed. This means that you will need to
check for correct types at every operation instead of at compile time.

One way that might work is to let every variable be of type Object and
downcast before every operation. Numbers and other values that are
not objects in Java would have to be boxed as objects and values
extracted from the objects before operating on them, then finally
boxing the result.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.