What is a compiled language? What is an interpreted language?

0. Simple mind map

insert image description here

1. The process of program running (translation first and then execution)

Before that, we must know that the operation of a program includes two aspects
: a) translation: the purpose of translation is to generate another set of code that can be directly executed by the computer;
b) execution: execution means that the computer executes the generated object code

2. Focus on the translation

There are two kinds of translation:
the first type, A code becomes B code, B code can be executed by computer, this process is one step to compile the
second type, A code becomes B code, but B code cannot be directly recognized by the computer, it is a Semi-finished products need to be translated into object code that can be directly executed by the computer. The execution
after compilation is

3. Is java a compiled language? Or interpretive?


Java is an extraordinary language. You can say that it is a translation language, or it is
not . In fact, the first step is actually a compilation process, and the second step is an interpretation process. It is said that it is an interpreted language because it really cannot be compiled and executed directly, and requires jvm interpretation to execute, but strictly speaking, the java language cannot be said to be a compiled language or an interpreted language, but both all included.

Finally, I quoted Brother Qing's sentence:
In fact, it is no longer so certain whether the language is interpreted or compiled. After all, technology is improving. For example, everyone thinks that C language is a compiled language and uses gcc to compile, but in fact, in TCC It can be directly explained and executed. Another example is that PHP is really an interpreted language. Facebook has developed a hiphop compiler a long time ago, which can compile PHP into C++ and then into binary.

Guess you like

Origin blog.csdn.net/m0_50991874/article/details/122551229