How does a computer know what a coding language is? How does it know the meaning of the English words you write within the code?

Executing a program is made by an application. If you want to work with a Spreadsheet you probably will use Excel. If you want to see a movie, you’ll probably run VLC or another movie player.

If you want to execute a Java Source Code, you should run Java that is a program you previously installed on the machine. If you want to run a python source code you have previously installed the python program.

There are apps that “understand” several languages like the browsers Chrome / Firefox. They understand Javascript, HTML, CSS

But as you cannot look at a movie with Excel, you cannot execute your Java Source Code with a Python “compiler”.

There are 2 types (and many others) of apps that understand languages. The main categorization is:

Compilers: They are apps that read all the code, and prepare a set of the machine or near machine sentences to be executed. Then all the source code generates another set of instructions machine can understand and human not.

Interpreters: They get the source code and “translate” one sentence at a time. Then they read a sentence, translate it, and execute it. and then read the next sentence and do the same.

This division generally is based on the Language more than the app. When someone defines a language generally is defined to be interpreted or compiled.

Leave a Reply