Is there a tool that can convert programming languages?

Asked 2 years ago, Updated 2 years ago, 87 views

Is there a language conversion tool?

Example:
Java System.out.println (aaa);
↑↓
PHP var_dump($aa);

Please let me know if there is a tool that can be translated in this way.
Also, I would like to have it, but do you feel it is necessary?

programming-language

2022-09-30 20:14

3 Answers

Looking at the comments, is it more like wanting to know how to write in language B when you know language A than a compiler from language A to B?

If that's the case, it's probably more appropriate to have code aggregation than tools (there are some "like" writing methods for each language), so for example, Rosetta code.

There are a lot of compilers/converters from language A to language B, as others have mentioned. Especially, conversions to javascript seem to be quite a few.


2022-09-30 20:14

It's a little different from the original answer, but what about the language Haxe?
You cannot convert from Java PHP, but you can convert from Haxe to Java PHP


2022-09-30 20:14

It's limited, but it looks like the following.

Google releases J2ObjC tool to convert Java code to Objective-C
http://www.atmarkit.co.jp/news/201209/18/j2objc.html

https://github.com/google/j2objc

I've never heard of it being used around me, but
It is still being maintained, so it may be able to withstand.
However, you need a Mac to use it.


2022-09-30 20:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.