3 ms·
Compiled means it's a direct executable in machine code. Java ain't that. Heck, if it needs a runtime with a garbage collector built into the runtime it's espec
by bastloing 2y ago
Compiled means it's a direct executable in machine code. Java ain't that. Heck, if it needs a runtime with a garbage collector built into the runtime it's especially junk.
- noelwelsh 2y agoNo, that is not what compiled means. A compiler is simply a program that translates from one language to another. Hence a compiled language is one that is translated into a different language prior to execution. Java is compiled twice; once to byte code and again to machine code by the JIT compiler. That is unless you compile it directly to machine code using, say, Graal Native Image. You are welcome to your opinion on the utility of garbage collection but the widespread usage of GC suggests the industry as a whole does not share your view nor is such an unnaunced view supported by research (e.g. https://dl.acm.org/doi/abs/10.1145/1094811.1094836 https://dl.acm.org/doi/abs/10.1145/1094811.1094836)
- bastloing 2y agoAs having a masters in computer science I respectfully disagree with you. Would you consider a program that translates C code to FORTRAN a compiler? Nope, it's a translator. A compiler compiles a language into a direct executable. Just like Microsoft Windows has executables, .exe file, there's no runtime required to run those files.
- dtech 2y agoYou should use your CS master skills to read the first line of the "Compiler" article in Wikipedia [1] > In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language). And maybe also the second line. JVM bytecode is an object code as referenced there. [1] https://en.wikipedia.org/wiki/Compiler https://en.wikipedia.org/wiki/Compiler
- orf 2y agoNobody calls them “translators”, that’s so silly. It’s a compiler, or transpiler (still a compiler). Avoid using appeals to authority when discussing, it doesn’t make you look good. Even more-so when your authority is relatively mundane and you’re totally incorrect.
- aeonik 2y agoI would call this a transpiler, and it's definitely a kind of compiler. I typically use the word compiler to imply that I'm moving to a lower level representation, and a transpiler as one that does a horizonal translation. There are expections to this general rule of thumb, Cross-compiling is a term used for a horizonal translation. I also watched this video of a PhD project that compiles JavaScript from an input of Visual data and JavaScript. Which is probably one of the more interesting uses of compiler I've seen. https://youtu.be/MQnVmEw6ISQ?si=NYCSuzi3IxG0md_k https://youtu.be/MQnVmEw6ISQ?si=NYCSuzi3IxG0md_k
- shepherdjerred 2y agoWhy would holding a MS make you an authoritative source on… anything? Anyway, there’s no real agreement on the terms and everyone has an opinion. This is as useful as arguing “is a taco a sandwich”
- dzaima 2y agoTranspilers are a subset of compilers, even if somewhat often "compiler" is used to refer to the ones producing executables. And .exe-s still need the OS, dynamic libraries, and, perhaps most importantly, the CPU (which is pretty much a VM interpreter, modern CPUs having what's essentially a custom IR, peephole optimizations, aliasing analysis, JITting, loop unrolling, PGO, caching, ...), to run.
- peterfirefly 2y agoI very much consider RATFOR a compiler.
- peeters 2y agojavac does produce machine code. You just don't like the machine.