Is there any real compiled programming language?!

Is there any real compiled programming language?!
6 Programming languages

If you are a developer or you were or you want to learn it, you must heard about compiler and interpreter.

In this article I'll talk about what is compiler and what is interpreter. And I'll talk about is the compiled language are 100% a compiled language!

What is a compiler?

A compiler is a special program that translates a programming language's source code into machine code, bytecode or another programming language. The source code is typically written in a high-level, human-readable language such as Golang or C++.

What is a interpreter?

As the name suggests, an interpreter transforms or interprets a high-level programming code into code that can be understood by the machine (machine code) or into an intermediate language that can be easily executed as well. The interpreter reads each statement of code and then converts or executes it directly. Python and PHP are interpreted languages.

Wait!!!

If interpreter and compiler translate codes into machine code then what's the difference between compiler and interpreter?!

There are many differences between them, but we don't talk about them. There is an important difference between them :

Interpreter translates program one statement at a time but compiler scans the entire program and translates it as a whole into machine code.

Is there any 100% compiled language exists?

Well I want to say No! There is no 100% compiled language exists in the world! But why am I saying this?

Let's talk about a compiled language like Golang. For example, there is a code that's reading a file line by line and execute a function for each line. Our code compiled into a machine code but can you debt guarantee that our code is fully compiled to machine code!? Of course not, because your code needs a file to completely execute, and it's not only a machine code that will run and ends!

Put quite simply, your code didn't compile your file content. That is why we can't say our language is an absolutely compiled language.

How should we explain compiled languages?

When we want to explain a language and talk about structure of it, we should say "A programming language that is closer to machine language is called a compiled language".

And the other hand "A programming language that is not closer to machine language is called a interpreted language"

At the end

In this article I don't want to say there is no compiled language or interpreted language. I only want to show you why a language is compiled or not and what is the real reason for it.