Interpreted and compiled languages: Difference between revisions
Mr. MacKenty (talk | contribs) No edit summary |
Mr. MacKenty (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Compiled languages are converted directly into machine code that the processor can execute. As a result, they tend to be faster and more efficient to execute than interpreted languages. They also give the developer more control over hardware aspects, like memory management and CPU usage. | Compiled languages are converted directly into machine code that the processor can execute. As a result, they tend to be faster and more efficient to execute than interpreted languages. They also give the developer more control over hardware aspects, like memory management and CPU usage. | ||
Compiled languages need a “build” step – they need to be manually compiled first. You need to “rebuild” the program every time you need to make a change | Compiled languages need a “build” step – they need to be manually compiled first. You need to “rebuild” the program every time you need to make a change. | ||
Examples of pure compiled languages are C, C++, Erlang, Haskell, Rust, and Go<ref>https://www.freecodecamp.org/news/compiled-versus-interpreted-languages/</ref> | Examples of pure compiled languages are C, C++, Erlang, Haskell, Rust, and Go<ref>https://www.freecodecamp.org/news/compiled-versus-interpreted-languages/</ref> | ||
== Interpreted Languages == | == Interpreted Languages == | ||
Interpreters run through a program line by line and execute each command | Interpreters run through a program line by line and execute each command. Your translator friend can then convey that change to you as it happens. | ||
Interpreted languages were once significantly slower than compiled languages. But, with the development of just-in-time compilation, that gap is shrinking. | Interpreted languages were once significantly slower than compiled languages. But, with the development of just-in-time compilation, that gap is shrinking. | ||
Examples of common interpreted languages are PHP, Ruby, Python, and JavaScript<ref>https://www.freecodecamp.org/news/compiled-versus-interpreted-languages/</ref> | Examples of common interpreted languages are PHP, Ruby, Python, and JavaScript<ref>https://www.freecodecamp.org/news/compiled-versus-interpreted-languages/</ref> | ||
== Video == | |||
<html> | |||
<iframe width="560" height="315" src="https://www.youtube.com/embed/I1f45REi3k4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |||
</html> | |||
== References == | == References == | ||
<references /> | <references /> |
Latest revision as of 06:49, 20 August 2021
Compiled Languages
Compiled languages are converted directly into machine code that the processor can execute. As a result, they tend to be faster and more efficient to execute than interpreted languages. They also give the developer more control over hardware aspects, like memory management and CPU usage.
Compiled languages need a “build” step – they need to be manually compiled first. You need to “rebuild” the program every time you need to make a change.
Examples of pure compiled languages are C, C++, Erlang, Haskell, Rust, and Go[2]
Interpreted Languages
Interpreters run through a program line by line and execute each command. Your translator friend can then convey that change to you as it happens.
Interpreted languages were once significantly slower than compiled languages. But, with the development of just-in-time compilation, that gap is shrinking.
Examples of common interpreted languages are PHP, Ruby, Python, and JavaScript[3]
Video