Do you have a Java version of CoffeeScript→ JavaScript?

Asked 2 years ago, Updated 2 years ago, 111 views

CoffeeScript→JavaScript

as in I'm looking for something that writes Java in a different language and compiles it with Java code.

○○→ Java

I have an image like this, but if you don't mind if it's close to you, could you please let me know? Also, I didn't know how to search this time, so I would appreciate it if you could tell me the words when you look into them.

java compiler

2022-09-30 18:52

7 Answers

The question refers to source code to source code compilation (so-called transpiler). I'm sure you are, so here are some of the transpylers I know and a list of other languages that run on JVM.

I think XTend is the closest to CoffeeScript.It's easy to understand and has similar goals for efficiency.Eclipse support is also hard, so it should be easy to try.

If you are in the middle of a Java-bound quest, I recommend Project Lombok for practical use.Try it.

"Sourcecode-to-Sourcecode" compiler

XTend becomes the dialectic of Java source code, with an emphasis on filling in the shortcomings of Java language usage.It is easy to describe functional processing and has many features that can reduce source code.The Eclipse environment is highly supported, and Java source code is generated before generating the Class file.

Project Lombok is an additional collection of annotations that conform to Java specifications, but has a special add-on that includes the Java source code generation phase before compiling.It provides an acrobatic and easy-to-understand source code generation that allows you to automatically generate common repeating blocks. If you're worried about Getter/Setter, it's worth a thought.Thank you for visiting Lambok for a while.

The well-known JSP (Java Server Pages) idea is to embed Java code into HTML pages. When compiled on a web server, it has undergone conversion to an ugly Java source code internally.

Haxe is a development tool primarily targeted at mobile apps, but has Java source code in its output.

Processing is a simplified version of the Java language that allows you to write CG demos and control Arduino with flat code. This is an advanced language designed for beginners of programming, which also passes through Java source code once before compiling.

"Sourcecode-to-Bytecode" compiler

Also, any language that moves on top of the JVM is fine regardless of Java source code. If so, there are many high-quality candidates.

Conversion to byte code is likely to be off-topic, so introduction alone eliminates the explanation.


2022-09-30 18:52

The famous places are Clojure, Groovy, and Scala. However, the JVM byte code will be printed instead of Java code.In that sense, it's a little off the mark.

"When searching, it is recommended to use keywords such as ""JVM language"" or ""programming language running on JVM."""


2022-09-30 18:52

I think it's a list question, but the Haxe also prints the Java code.

Introduction to Haxe/Java - Haxe

This information is more common in English, so if you search like generator or compile A into B, you may get stuck.Simply converter (I think it's not exactly true) but I think it's stuck as a search keyword.


2022-09-30 18:52

I'm not sure if the non-Java language is correct. I wonder if it's similar to what Xtend and others are looking for.

(I will just spit out the Java code and compile it)

If you search C#to java converter, you will find something that converts C# to Java. (I learned that there is a tool called CS2J)


2022-09-30 18:52

There seems to be something called Objc2j that converts Objective-C to Java. https://code.google.com/p/objc2j/


2022-09-30 18:52

NetRexx, derived from the REXX language developed by IBM, converts the source into a Java source and compiles it in Java. works.

http://www.netrexx.org/


2022-09-30 18:52

The language Frege is the source code translator to Java.

http://uehaj.hatenablog.com/entry/2013/12/21/065929

Frege has the following characteristics:
- Net functional language
- Unqualified evaluation (so-called delay evaluation)
- Static Language Based on Hindley-Milner Inference

Feel free to try this online REPL at here.You can then see the Java source generated by ":java".


2022-09-30 18:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.