similar projects:
jweet A transpiler from Java to TypeScript/JavaScript
java2typescript Java To TypeScript Transpiler
I myself, not on behalf of you, ah, I hope to write web programs in the future. I don"t need two editors to come back and cut. I don"t have to write js for a while and write java for a while. And then call it through http. And handwritten url. The same method is written in the foreground and in the background.
so, I think that in the future, I can write the same language in the same compiler, js and java. I prefer to write java, foreground and background interaction. It looks as simple as controller calling the service method. (can you seal another layer on top of http? or use the rpc reference ( DWR , dubbo )
) ts is a syntax that cannot be directly recognized by browsers and can only be recognized by ordinary js grammar browsers through a translator.
by the same token, since there is a ts-to-js translator ts, as long as there is a java-to-js translator, it is possible to write js in java, that is, to convert one grammar into another.
after you write ts, use tsc to transfer ts to js.
to write java, use the javajs translation command to convert java to js.
doesn"t feel very difficult or troublesome.
it is said that babel, the translator from es6 to es5, was written by a high school student. Everyone can write it if they want. Why can"t others do it to me? It"s not a difficult thing.
apart from the projects I share, are there any other projects that are better than these two projects, or have implemented the functions I mentioned?
and what should I know if I want to write it myself? Is there a ready-made translator library? As long as you enter the differences between different languages and grammars, you can transfer one language to another, or what simple github source code you can refer to
.