What is a compiler - description

If you are just starting to learn programming, or if you were just interested in this issue, you probably came across the mysterious word "compiler". This apparently terrible concept can scare people away. In this article we will try to figure out whether everything is so terrible. What is a compiler?

what is a compiler

Definition and history of occurrence

In simple words, the compiler is a program that converts the text of a program written by the user into some form that is suitable for execution on a computer.

Such programs appeared along with the birth of the first programming languages. It happened in the late 50s. It turns out that the story, which is associated with compilers and programming languages, has been going on for more than six decades. Despite such a serious period, this area of โ€‹โ€‹computer science can in no way be called obsolete or well-established. On the contrary, with the passage of time, with the advent of new industries and tasks for which computers are used, a need arises for the development of new, more convenient programming languages. Accordingly, compilers are needed for these languages. Windows, Linux, MacOS - each platform has its own development.

Principle of operation

The source text written by the developer in a high-level language is converted into a program in a special machine language. The resulting code is called an executable program. It can be installed and run on any computer without making any more transformations.

java compiler

Simple but difficult

By tradition, compilers in computer science are one of the basic things along with operating systems, as well as databases. What is a compiler? This is, in a sense, the basis of computer science.

From another point of view, the very topic of creating such programs implies a large number of theoretical and technological aspects that are associated with programming. Many developers believe that this topic is generally the most attractive in all computer science. When a programmer develops a program that solves a problem, he writes it in a specific language. In the process of development, he operates with terms that are close to the area with which he has to deal. The computer does not understand at all what a person tells him. He is able to understand only fairly simple things, which include numbers and variables, cells and registers, permanent and temporary memory. What is a compiler? This is a program whose task is to translate concepts close to the subject area of โ€‹โ€‹the developer into concepts that a computer can manipulate.

This is exactly what the Java compiler or any other programming language does. Each time a new language appears, there is a need to translate the code written in it into the form that the computer can understand. Otherwise, he will not fulfill it. After all, there is always a semantic gap between the concepts of man and computer. It is for overcoming it that the programming language compilers are intended.

windows compilers

Difficulty creating

The creators of such programs face a wide variety of problems. These are scientific problems that are associated with the correct reflection of the concepts of the applied field. These are both engineering and technological problems associated with the implementation of this very mapping.

The task of creating a compiler consists of many heterogeneous subtasks. This is a complex, but very exciting industry, which many programmers devote their lives to. And do not regret it.

c compiler for windows

Class and compiler

Probably many have heard of languages โ€‹โ€‹such as C and C ++. After all, they are one of the most popular and common. These are very serious programming languages โ€‹โ€‹that contain powerful concepts that are convenient for displaying the concepts of the application areas in which developers work. For example, there is the concept of classes, functions. They are fundamental to many languages, but for C ++ they are especially characteristic.

It is much more convenient for the programmer to create models using such concepts. The C compiler for Windows or another operating system helps display such high-level things in a form that a computer will understand. Only then can he manipulate them.

Any computer, no matter how powerful and complex it may be, operates with very simple concepts. But the concept of a class is difficult, since it is very convenient to display many things from real life with its help. The compiler turns complex concepts into primitive ones.

programming language compilers

Compiler development as work

In recent years, there has been a tendency when any large company associated with information technology releases its own programming language, which is then promoted to the masses of developers.

Of course, a compiler is required for each language. And firms, as a rule, create them together with languages. But there is also a large number of independent programmers and companies that for one reason or another want to have their own compilers for languages, or they develop new languages โ€‹โ€‹and, accordingly, compilers for them. It is safe to say that a specialist who is dedicated to this field will certainly not remain without work.

Thus, now you should understand what a compiler is. This is a translation program between a developer and a computer, without which there is nowhere in the field of computer science.

Source: https://habr.com/ru/post/K10799/


All Articles