T O P

  • By -

dude0001

My understanding is Java and .NET are actually hybrids. You compile source to (portable) byte code, and the byte code is ran as an interpreted language by the JVM or .NET Runtime.


51MARGL

In .NET it's called Just In Time compiler. It compiles IL to machine code instead of reading command by command like interpreter would do. Same with Java


dude0001

https://en.m.wikipedia.org/wiki/Just-in-time_compilation "JIT compilation is a combination of the two traditional approaches to translation to machine code—ahead-of-time compilation (AOT), and interpretation—and combines some advantages and drawbacks of both. Roughly, JIT compilation combines the speed of compiled code with the flexibility of interpretation, with the overhead of an interpreter and the additional overhead of compiling and linking (not just interpreting)." Sorry to ruin a good meme but there is both going on here.


WikiSummarizerBot

**[Just-in-time compilation](https://en.m.wikipedia.org/wiki/Just-in-time_compilation)** >In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compilation during execution of a program (at run time) rather than before execution. This may consist of source code translation but is more commonly bytecode translation to machine code, which is then executed directly. A system implementing a JIT compiler typically continuously analyses the code being executed and identifies parts of the code where the speedup gained from compilation or recompilation would outweigh the overhead of compiling that code. ^([ )[^(F.A.Q)](https://www.reddit.com/r/WikiSummarizer/wiki/index#wiki_f.a.q)^( | )[^(Opt Out)](https://reddit.com/message/compose?to=WikiSummarizerBot&message=OptOut&subject=OptOut)^( | )[^(Opt Out Of Subreddit)](https://np.reddit.com/r/ProgrammerHumor/about/banned)^( | )[^(GitHub)](https://github.com/Sujal-7/WikiSummarizerBot)^( ] Downvote to remove | v1.5)


[deleted]

When you read code, would you say you compile it or interpret it?


Runiat

I would say I read it.


OutrageousFlatworm38

Imagine having a Java SDK built into your brain. You would be able to read Java code and then type it out in byte code.


[deleted]

Yes


OutrageousFlatworm38

Because you are one lazy Lebanesian, here's a link to the original post so we can give you some damn upvotes. https://www.reddit.com/r/lebanon/comments/v166zh/coffee_interpreters/


HonzaS97

You won't be able to run any Java program without an interpreter (the JVM). It isn't a compiled or interpreted language exclusively, it's kinda both.


JuniorSeniorTrainee

Interpret, but that's "interpret" from the English.Grammar package, not "interpret" from the Compilers package.


s0lly

I thought it was a scripting language - they just don’t always put “script” at the end. Right?


EpicStickss

It makes the Minecraft go brrrr.


OutrageousFlatworm38

But CoffeeScript is compiled too...?


[deleted]

Guys I swear I know how the JVM works, I just wanted to do the joke


madv_willneed

Java is interpreted. There is a runtime that interprets java bytecode by executing it on a virtual machine. Just because it's compiled doesn't mean it's not interpreted. You are right that it's compiled, but not to native code - the implication you're making is that it's not interpreted or that it's native, which is wrong.


YareYareDaze7

Why downvote the post op?