Interpreted vs Compiled Programming Languages:
Compiled Languages:
These languages are compiled all at once (build) into a binary that is then executed.
This does have a long build time and needs to be rebuilt anytime there is a source code changes but then the binary can be executed quickly and repeatedly.
Also, needs less memory and CPU power. The binary is also built to a specific specific CPU ISA and will have to be re-compiled/emulated/ported to another ISA if needed.
Examples are: C, C++, Erlang, Haskell, Rust, and Go.
Interpreted Languages:
These languages compile/build the source code into machine code line by line as its being executed.
You don't need to wait to rebuild the source code all at once when there are changes or first release.
This is much more CPU intensive (needs more memory).
But in recent years there are Jit (Just in time compilers) for common ISA's that can significantly speed up the process to near compiled languages performance.
The code is also not bound to a specific CPU ISA. Since the source code is begin converted into a binary as the program is being executed.
Examples are: PHP, Ruby, Python, JavaScript, HTML, CSS.
Java:
Java from Oracle (previously Sun Microsystems) is like a virtual CPU.
And a hybrid language between Compiled & Interpreted.
You compile bytecode to the Java Virtual Machine. Then that Java VM interpreted/emulated the binary to your specific CPU.
Source 1 (Main)
Source 2 (HTML/CSS)
Source 3 (Java)
Date: October 7th 2024
Back