Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to code java in another language?

Tags:

java

I was curious as to whether or not a person could code in another language. I DON'T mean naming your variables in different languages like this:

String[] tableau = {"Janvier", "Fevrier"};
System.out.println(String[0].length);

But more like

Chaîne[] tableau = {"Janvier", "Fevrier"};
Système.sortie.imprimeln(Chaîne[0].longueur);

Is that doable or would you need to write your own french or [insert language] based coding language?

like image 948
WeekzGod Avatar asked Nov 27 '13 02:11

WeekzGod


People also ask

Can you code Java in other languages?

You can directly call to functions that are written in other ILE programming languages. Java Native Interface must be used to call other languages from Java. ILE languages are always compiled and run as machine instructions. Java programs can be interpreted or compiled.

Is it possible to code in other languages?

Most new codes are actually developed by English-speaking individuals. But not all programming codes are in English. Although most keywords are written in English, comments, variable user written classes and methods are often in the programmer's own language.

Can you code Java in Spanish?

This is Not Possible. Java Code write in only English Language. Technically you can't unless you write your own parser that translates only the tokens.


1 Answers

If you were to use a Preprocessor to accomplish this - I believe it would work perfectly well. Java does not ship with one, but C and C++ did (e.g. cpp) - So, you could add a step in your build chain to perform preprocessing and then your code would be translated into the "hosted" English Java before being compiled. For another example, consider the language CofeeScript; a language that translates itself into JavaScript. So, as long as your mapping is one for one equivalent I believe the answer is Oui.

like image 193
Elliott Frisch Avatar answered Oct 02 '22 20:10

Elliott Frisch