Which is easier? Translating from C++ or from Java...

Stefan Seefeld seefeld at sympatico.ca
Mon Mar 28 20:06:14 EST 2005


woodsman at gmail.com wrote:
> Patrick Useldinger wrote:
> 
>>cjl wrote:
>>
>>
>>>Implementations of what I'm trying to accomplish are available
> 
> (open
> 
>>>source) in C++ and in Java.
>>>
>>>Which would be easier for me to use as a reference?
>>>
>>>I'm not looking for automated tools, just trying to gather opinions
> 
> on
> 
>>>which language is easier to understand / rewrite as python.
> 
> 
>>Depends on what language you know best. But Java is certainly easier
> 
> to
> 
>>read than C++.
> 
> 
> There's certainly some irony in those last two sentences. However, I
> agree with the former. It depends on which you know better, the style
> of those who developed each and so forth. Personally, I'd prefer C++.

I don't think the OP was asking for personal preference, and so I happen
to agree with the reply: parsing Java is definitely *much* simpler than
parsing C++, no matter how well you know either. As far as manual translations
go, that is much less a matter of ease of parsing but instead how closely
programming idioms match between the two languages that are involved.
And that obviously also depends on the specific code that needs to
be rewritten and the style it is written in (i.e. for example OO vs. templates,
etc.).

Regards,
		Stefan



More information about the Python-list mailing list