r/java • u/alexp_lt • Apr 21 '26
CheerpJ 4.3 - Run unmodified Java applications in the browser
https://labs.leaningtech.com/blog/cheerpj-4.3
84
Upvotes
r/java • u/alexp_lt • Apr 21 '26
View all comments
Show parent comment
3
u/pron98 Apr 21 '26 edited Apr 21 '26
I believe the people who use the term generally mean that, and I'm not saying that the word is meaningless, but giving a special term to compilers that compile from a language with up to three letters in its name to another language with up to three letters in its name is about as meaningful.
Compiler people rarely use that term because that distinction, in itself, is not material to the workings of a compiler. It certainly doesn't make compilation any easier (or harder) in general; indeed, it makes little difference in how the compiler works. Even in those cases where it does happen to make a difference (e.g. TS -> JS, which largely just erases type annotations), the compiler people tend to call it a compiler.
I could see the need for a different term if the output of the compiler is not intended just for the computer to execute but also for people to read and edit manually (as that could sometimes have an effect on the compiler's design), but the people who use the term don't make that distinction, I think.
(My theory is that the term became more widespread when hand-writing Assembly largely disappeared and people assumed that since Assembly is not as convenient for people to write by hand as a high-level language, generating machine code is also harder for compilers than generating code in some other languages, but that's not generally the case.)
No, it compiles (low-level) Java bytecode to JS. But the very use of the term is a pet peeve of mine even when it does apply, because it seems to suggest some material difference that just isn't there, but I'm probably tilting at windmills at this point :).