The progress of computer technologies has defined the process of the emergence of new diverse sign systems for recording programming language algorithms. The meaning of the appearance of such a language is the simplification of the program code.
Every day our world becomes more mobile and informational. More and more computers are entering our daily lives, and to facilitate our communication with them, new software is being created using various programming languages.
Programming languages can be divided into five generations. The first generation includes languages created in the early 50s, when the first computers were just born. It was the first assembler language created on the principle of “one instruction - one line”.
Start
Machine codes and assembler
The physical principles of operation of electronic devices of computers are such that a computer can perceive commands consisting only of ones and zeros — a sequence of voltage drop, that is, a machine code. At the initial stage of computer development, it was necessary for man to compile programs in a language understandable to a computer, in computer codes. Each instruction consisted of an opcode and operand addresses, expressed as different combinations of ones and zeros. So, any program for the processor looked at the time as a sequence of ones and zeros.
As the practice of communicating with a computer has shown, such a language is cumbersome and inconvenient. When using it, it is easy to make a mistake by writing the wrong sequence 1 or 0. It is very difficult to control the program. In addition, when programming in machine codes, one should be well aware of the internal structure of the computer, the principle of operation of each unit. And the worst thing is in such a language that programs in this language are very long sequences of ones and zeros are machine dependent, that is, for each computer it was necessary to create its own program, and programming in machine codes requires a lot of time from the programmer, labor, increased attention.
Pretty soon it became clear that the process of forming the machine code can be automated. As early as 1950, the mnemonic language, assembly, began to be used to record programs. The assembly language made it possible to present the machine code in a more human-friendly form: to indicate the commands and objects on which these commands are executed, instead of binary codes, letters or abbreviated words were used that reflected the essence of the command. For example, in assembly language, the command to add two numbers is denoted by the word add, while its machine code may be: 000010.
Assembler is a low level programming language. A low-level programming language is a programming language that is focused on a specific type of processor and takes into account its features. In this case, “low level” does not mean “bad.” This means that language operators are close to machine code and are oriented to specific processor commands. The emergence of assembly language made life easier for programmers, since now instead of zeros and ones rippling in the eyes, they could write a program with commands consisting of characters close to the usual language. For that time, this language was an innovation and was popular because it allowed writing programs of small size, which is a significant criterion for those machines.
But the complexity of developing large software systems in it led to the emergence of third-generation languages - high-level languages. But this life of the assembler is not over, he is alive to this day and not only alive, but also popular in narrow circles. Now it is used in writing separate fragments of programs or sometimes in writing programs themselves. There may be many examples, but the most striking is the use of the assembler in writing drivers, games, and OS loaders. Do not forget that this language is also popular with hackers, and what language! But what do they like it so much in him? Of course, the fact that the speed of the program is much higher than the speed of a program written in a high-level programming language. This is because the resulting program size is very small. But what about antivirus software developers? They, too, are not badly bogus and also use the assembler in some modules of their programs, which also ensures their speed. And if not for the assembler, some programs would load about an hour! So assembler is truly an eternal language and for many, many years it will serve humanity! [one]
The first high-level programming languages
Mid 50s characterized by rapid advances in programming. The role of programming in machine codes began to decrease, new programming languages began to appear, acting as an intermediary between machines and programmers. The time has come for the second and third generations of programming languages.
Since the mid 50s. XX century. began to create the first high-level programming languages (high-level programming languages). These languages were not tied to a specific type of computer (machine-independent). For each of them their own compilers were developed. Compilation is the translation of a program compiled in a high-level source language into an equivalent program in a low-level language close to the machine code (absolute code, object module, sometimes an assembly language).
FORTRAN programming language
The first high-level language Fortran was created in the period from 1954 to 1957 by a group of programmers led by John Backus at IBM. It was intended for scientific and technical calculations. The name Fortran is an abbreviation of FORmula TRANslator (formula translator).
Language History
At the end of 1953, John Backus proposed the development of an effective alternative to the assembler for programming on the IBM 704 PC. By mid-1954, the draft specification of the Fortran language was completed. The first manual for Fortran appeared in October 1956 along with the first compiler, delivered in April 1957. The compiler was optimizing because customers refused to use a high-level programming language that generated code with lower performance than assembler.
At that time, the community was skeptical about the new way of programming and did not believe that Fortran would allow programming faster and more efficiently. According to John Backus himself, most of his work was aimed at "being lazy." He terribly did not like to write programs for the IBM 701 in assembler.
The language has been widely accepted by scientists for writing computationally intensive programs. The inclusion of a complex data type made it particularly suitable for technical applications.
By 1960, Fortran versions for IBM 709, 650, 1620, 7090 computers existed. Its great popularity prompted rival computer manufacturers to create Fortran compilers for their computers. Thus, already by 1963 there were more than 40 compilers for different platforms. That is why Fortran is considered the first widely used programming language. [2]
Fortran in the USSR
Fortran appeared in the USSR later than in the West, because at first Algol was considered a more promising language. In the implementation of Fortran, a great role was played by the communication of Soviet physicists with their colleagues from CERN, where in the 1960s almost all calculations were carried out using Fortran programs.
The first Soviet compiler from Fortran was created in 1967 for the Minsk-2 car, but it did not receive much fame. The widespread introduction of FORTRAN began after the creation of the FORTRAN-DUBNA compiler for the BESM-6 machine in 1968. Machines of the EU computer, which appeared in 1972, already originally had a Fortran compiler (“borrowed” from IBM / 360 along with other software)
Modern Fortran. The merits of the language
Fortran was widely used mainly for scientific and engineering calculations. It is perfect for solving numerical problems, since during its existence a lot of libraries have been written. It is used to this day, but not so much because of a successful design, but because of the large number of programs written on it, there is no point in changing and, moreover, rewriting which does not make sense. Its structure contributes to the fact that the compiler can optimize calculations very well.
There is such an admonition among scientists that any mathematical problem already has a solution in Fortran, and, indeed, can be found among thousands of Fortran packages, and a package for multiplying matrices, and a package for solving complex integral equations, and many, many others.
ALGOL 68 Programming Language
The reason for the emergence of the language ALGOL
Since Fortran was such a successful language, Europe was worried that IBM would dominate the computer industry. The German Society for Applied Mathematics and Mechanics (GAMM) has established a committee for the development of a universal language. At the same time, the Computer Engineering Association (ACM) organized a similar committee in the United States. Despite the fact that the Europeans had some concern about the dominance of the Americans, both of these committees merged into one.
Algol was developed in 1958 at a weekly conference at ETH (Zurich, Switzerland) as a universal programming language for a wide range of applications, and then finalized by a committee created by the International Federation for Information Processing . The committee included a number of leading European and American scientists and language engineers, among whom were John Backus , John McCarthy , Peter Naur , Edsger Dijkstra and Joseph Wagsten, who later headed the Kobol language development committee.
During the work there were great difficulties of a non-fundamental nature. For example, one of the committee members recalled the “decimal storm” - an extremely sharp discussion between American and European participants about which symbol should be used as a separator for the integer and fractional parts of a number. The Americans insisted on the point, while the Europeans demanded to use the comma that was traditional for Europe. In order to avoid conflicts on minor issues, it was decided that the Algol description would be three-level, including the level of descriptions, publications and implementation. Minor issues, such as the choice between a point and a comma or the alphabet used, were brought to the second or third level, which allowed solving fundamental questions relatively quickly. At the level of publications, agreed later, the use of national keywords and data presentation standards (including the decimal point) was allowed; the level of implementation defined the language perfectly strictly - according to it, the translators had to be built.
At first, the proposed name ALGOL (ALGOrithmic Language) was rejected. But since it became common, the official name of IAL had to be subsequently changed to ALGOL 58.
The new version appeared in 1960, and ALGOL 60 (with minor changes made in 1962) from the 60s to the early 70s. last century was the standard of academic programming language.
The new language has both adherents and critics. In the US, Algol was taken coldly, it was popular only in the academic environment, and not everywhere. Those who tried to implement Algol, faced with a number of difficulties.
For example, it was found that none of the computers that existed at that time supported the input-output of all the 116 letters that made up the Algol alphabet.
But in Europe Algol was accepted with enthusiasm. He quickly gained popularity in the academic environment, everywhere there was a development of compilers, many of which, despite the difficulties of implementation, proved to be very successful. Algol spread from Great Britain to the Far East of the USSR, becoming both a universal language for describing algorithms in scientific publications and a means of real programming.
Properties of the language. Its advantages and disadvantages
In Algol, the idea of a program appeared not as a free sequence of commands, but as a block structure consisting of clearly defined and separated parts. The main block of the Algol program is the main program itself. It contains its executable part, enclosed in a block, bounded by a pair of begin and end keywords, as well as descriptions of subroutines. Each subprogram is a program in miniature that has its own data, described inside it, a uniquely defined interface in the form of a name and a list of formal parameters, and a block of code.
In this case, sub-blocks can be allocated in a block.
Structural control constructs were singled out: branches, loops, consecutive sections that execute conditionally or repeatedly nested sets of operators, also limited to the same keywords begin and end.
Such a program structure seems obvious to modern programmers, in some ways obsolete and not always convenient, but at the time Algol appeared, it was all a noticeable step forward. Programs became regular, it made it possible to increase them in volume, keeping them foreseeable, understandable, accessible to analysis and correction. It was on the basis of Algol and its descendant languages that successful work was performed on the analytical proof of the correctness of the programs.
In Algol, two ways were proposed to pass parameters to a subroutine — by name and by value. If the second method does not cause objections (it is widely used in the absolute majority of languages to this day), then the first (it assumes that the name of the actual parameter is passed to the procedure, and the procedure works as if its code is written at the access point, where instead of formal parameter is written the name of the actual) led to difficulties in the implementation of compilers and the appearance of difficult-to-find errors.
LISP programming language
Lisp language was proposed by J. McCarthy in his work in 1960 and is focused on developing programs for solving non-numerical problems. The English name of this language - LISP is an abbreviation of the expression LISt Processing (list processing) and well underlines the main area of its application. The concept of "list" was very capacious.
In the form of lists it is convenient to represent algebraic expressions, graphs, elements of finite groups, sets, inference rules, and many other complex objects. Lists are the most flexible form of presenting information in the memory of computers. It is not surprising, therefore, that a convenient language specially designed for processing lists has quickly gained popularity.
Language Development
During the nearly forty-year history of its existence, a number of dialects of this language have appeared: Common LISP, Mac LISP, Inter LISP, Standard LISP, etc.
The differences between them are not of a fundamental nature and basically boil down to a slightly different set of built-in functions and some difference in the form of recording programs. Therefore, a programmer who has learned to work on one of them can easily master any other.
The main advantages of the language
The great advantage of Lisp is its functional orientation, that is, programming is carried out using functions. Moreover, the function is understood as a rule, which associates the elements of a class with the corresponding elements of another class. The matching process itself does not have any influence on the work of the program, only its result is important - the value of the function. This makes it relatively easy to write and debug large software packages. The clarity of programs, a clear delineation of their functions, the absence of tricky side effects when they are performed are mandatory programming requirements for such logically complex tasks as are the tasks of artificial intelligence.
Discipline in programming becomes especially important when not a single person works on a program, but a whole group of programmers.
COBOL programming language
Kobol was developed in 1959 and was intended primarily for writing programs for developing business applications, as well as for work in the economic sphere.
The language specification was created in 1959. The creators of the language set themselves the goal of making it machine-independent and as close as possible to natural English. Both goals were successfully achieved; programs on COBOL are considered to be understandable even to non-specialists, since texts in this programming language do not need any special comments (self-documenting programs).
Strengths and weaknesses
COBOL - the language is very old and in its time was used very actively, so there are many implementations and dialects. A number of standards were approved for the language: in 1968, 1974, 1985 and 2002. The latter standard added support for the object-oriented paradigm to the language.
The language allows you to work effectively with a large amount of data, it is saturated with various possibilities of search, sorting and distribution. Other advantages of COBOL are usually its structuredness. Quite powerful compilers from this language are designed for personal computers. Some of them are so effective that the program, debugged on a personal computer, it is easy to transfer to large computers.
Listing the minuses, it is impossible not to recall that only simple algebraic calculations can be programmed in Cobol. For complex engineering calculations, this language is not suitable.
Conclusions on this period of development of programming languages
At the dawn of computerization (in the early 1950s), machine language was the only language that had not been invented by more people by that time. Languages of a low level are a little similar to normal, habitual to the person language. Large, bulky programs in such languages are rarely written. But if the program is written in such a language, then it will work quickly, taking up a small amount and allowing for a minimum number of errors. The lower and closer to the machine level of the language, the smaller and more specific tasks that are assigned to each team.
To save programmers from a harsh machine programming language, high-level languages were created (that is, non-machine-language languages), which became a kind of connecting bridge between man and machine computer language. High-level languages work through translation programs that introduce “source code” (a hybrid of English words and mathematical expressions that a machine reads), and ultimately causes the computer to execute the corresponding commands that are given in machine language.
With the advent of high-level languages, programmers were able to devote more time to solving a specific problem, without being distracted especially by the very delicate issues of organizing the task execution process itself on the machine. In addition, the emergence of these languages marked the first step towards the creation of programs that went beyond research laboratories and financial departments.
Summing up this period of development of programming languages, we can conclude that high-level programming languages (FORTRAN, ALGOL, LISP, COBOL, etc.) are not similar to assembly language. High-level languages are designed specifically to deal directly with the problem solved by the program. In this capacity, they are sometimes called procedural languages, since they describe the procedure used to solve a problem. High-level languages are machine-independent. Programs in assembly language are directly related to the machine on which they should be executed.
Advantages of high-level programming languages:
- The alphabet of the language is much wider than the machine language, which makes it much more expressive and significantly increases the visibility and clarity of the text;
- The set of operations allowed for use does not depend on the set of machine operations, but is chosen for reasons of convenience in formulating algorithms for solving problems of a particular class;
- Constructions of operators are set in a form convenient for a person;
- A wide range of data types is supported.
A disadvantage of high-level languages is the larger size of programs compared to programs in a low-level language. Therefore, mainly high-level languages are used to develop software for computers and devices that have a large amount of memory. And different subspecies of the assembler are used for programming other devices, where the size of the program is critical.
Machine Language
It is not known how much the development of programming would have accelerated if Zuse's developments became available to other scientists in the late 40s, but in practice with the development of computer technology, computer language first became popular. With its help, the programmer could set commands, operating with memory cells, fully using the capabilities of the machine. The essence of this language is a set of codes that are necessarily understood by the processor that is being accessed. Parts (“words”) of this language are called instructions , each of which represents one elementary action for the central processor, such as reading information from a memory cell. Only with the understanding of computer hardware and knowledge of these integer codes could the processor be directly controlled. At that time computers were simple computers used for various mathematical calculations. But they developed, and the use of most computers at the machine language level is difficult, it was especially difficult to read and modify such programs, which was aggravated by the use of absolute memory addressing [3] . Therefore, over time, the use of machine codes had to be abandoned.
For example, the programmer can use 16 different commands to organize reading a data block from a floppy disk, each of which requires 13 parameters, such as the block number on the disk, the sector number on the track, etc. When the operation with the disk is completed, the controller returns 23 значения, отражающие наличие и типы ошибок, которые необходимо анализировать. Уже одно обращение к процессору громоздко, а анализ ошибок и вовсе представляется невообразимым, особенно, если не именно с этим процессором приходиться работать. Таким образом, набор команд машинного языка сильно зависит от типа процессора.
Язык ассемблера
На протяжении 1950-х годов запросы на разработку программного обеспечения возросли и программы стали очень большими. Приходилось писать очень много кода, хотя обеспечение и было весьма простым: по тем временам дизайн рабочего стола был проще нынешнего, программы работали с элементарными вещами, а компьютер только ещё начинал победно шествовать. Однако программы запутывались всё больше, их структура усложнилась, потому что всё время развивалась компьютерная техника. Тогда стали пользоваться специальными программами- сборщиками программ из маленьких кусочков кодов — ассемблерами. Начался новый этап развития.
Теперь, когда была нужна эффективная программа, вместо машинных языков использовались близкие к ним машиноориентированные языки ассемблера . К таковым относились, например, Autocode, с 1954-го г. — IPL (предшественник языка LISP), с 1955-го г. — FLOW-MATIC . Теперь люди стали использовать мнемонические команды взамен машинных команд.
But even work with the assembler is quite complicated and requires special training. For example, for the Zilog Z80 processor, machine command 00000101 instructs the processor to reduce its register B . In assembly language, this will also be written as DEC B
High Level Languages
The next step was made in 1954, when the development of a high-level language - Fortran ( eng. FORTRAN - FORmula TRANslator ) was started, for which the compiler first appeared in April 1957 [4] . The development of such a language was prompted by the new IBM 704 computer introduced in 1954, in which index addressing and floating-point operations were implemented at the hardware level [5] . Following him, several other languages appeared, for example: LISP , ALGOL 58 , FACT . High-level languages imitate natural languages using certain words of the spoken language and common mathematical symbols. These languages are more convenient for humans, with the help of them you can write programs up to several thousand lines in length. By conditional words, it was possible, as is customary for a person, to express much more easily a complex program operation from bits. However, the early versions of Fortran are much inferior to late concepts and languages, it was used to create relatively simple programs by modern standards [6] .
In the second half of the 50s, an international development team attempted to create a universal programming language. As a result, ALGOL 58 ( English ALGOrithmic Language ) appeared, in many respects it was the successor of Fortran. New concepts and generalizations were added to it, the concept of data types was formalized, the use of identifiers of any length was allowed when Fortran was limited to 6 characters [7] . This version of the language was more of a draft, so in January 1960, the second meeting of the committee for its development was held in Paris , where it was decided to make significant changes. The new version was called ALGOL 60, the main innovations in it were: the concept of block structure, the ability to create recursive procedures, automatic arrays [8] . Despite its many advantages, ALGOL was never widely used, primarily because of the difficulty in its implementation and the lack of support from IBM [9] .
Later COBOL (1959), Pascal (1970), C (1972) appeared.
The emergence of structured programming
By the end of the 1960s, due to the increasing complexity of programs and the further development of software, it became necessary to increase the productivity of programmers, which led to the development of structured programming . The founder of this methodology is Edsger Dijkstra , who in 1968 published his famous letter “Operator Goto is considered harmful” [10] , and also described the basic principles of structured programming [11] . With the development of structured programming, the next achievement was procedures and functions . That is, if there is a task that is executed several times, then it can be declared as a function or as a procedure and simply call it in the execution of the program. The overall program code in this case becomes smaller. This contributed to the creation of modular programs .
The next achievement was the integration of heterogeneous data, which are used in the program in a bundle, into structures.
Structures are composite data types built using other data types. For example, the structure of time is divided into: hours, minutes, seconds. In turn, the hours, minutes, and seconds are described using more simple and elementary data types. And instead of working with individual variables in which it is easy to get confused, you can go to the “time” structure, which already includes hours, minutes and seconds, and work with it as with a single type of the same format.
Structural programming involves well-defined control structures, program blocks , the absence of unconditional branch instructions ( GOTO ), autonomous subroutines, support for recursion, and local variables. The essence of this approach is the possibility of splitting the program into its constituent elements with an increase in the readability of the program code [12] .
Functional (applicative) languages were also created (Example: Lisp - English. LISt Processing , 1958) and logical languages (example: Prolog - English. PROgramming in LOGic , 1972).
Although the introduction of structured programming gave a positive result, even it turned out to be untenable when the program reached a certain length. In order to write a more complex and long program, a new approach to programming was needed.
OOP
When using data structures in the program, the corresponding functions for working with them are developed. This led to the idea to combine and use them together, so classes appeared.
A class is a data structure that contains not only variables, but also functions that work with these variables.
In short, this achievement in the field of programming was very great. Now programming could be divided into classes and test not the whole program consisting of 10,000 lines of code, but the program could be divided into 100 classes and each class should be tested. This greatly facilitated the writing of a software product.
As a result, in the late 1970s and early 1980s, principles of object-oriented programming were developed. OOP combines the best principles of structured programming with new concepts of encapsulation , polymorphism of subtypes, and inheritance .
The first object-oriented programming language is Simula -67, in which classes first appeared [13] . OOP concepts were further developed in the Smalltalk language , which also laid the foundations of window-controlled systems [14] . More recent examples of object-oriented languages are Object Pascal , C ++ , Java , C #, and others.
OOP allows you to optimally organize the program, breaking the problem into its component parts, and working with each separately. The program in an object-oriented language, solving some problem, in fact, describes a part of the world related to this task.
Notes
- ↑ R. Bogatyrev. Nature and evolution of scenario languages. - PC World, 2001.
- ↑ E.K. Henner. Computer science, edited by E.K. Henner. - Academy, 2004.
- ↑ Sebesta, 2001 , p. 61.
- ↑ Sebesta, 2001 , p. 65.
- ↑ Sebesta, 2001 , p. 63-64.
- ↑ Sebesta, 2001 , p. 68
- ↑ Sebesta, 2001 , p. 76.
- ↑ Sebesta, 2001 , p. 78
- ↑ Sebesta, 2001 , p. 79.
- ↑ David R. Tribble. Harmful: A Retrospective (37.11.2005). The appeal date is February 13, 2015.
- ↑ Edsger W. Dijkstra. Notes on Structured Programming (English) . University of Texas (04.1970). The appeal date is February 13, 2015.
- ↑ Yodan E. Structural design and design of programs. - Per. from English - M .: Mir, 1979. - 415s. - p. 174.
- ↑ Sebesta, 2001 , p. 92-93.
- ↑ Sebesta, 2001 , p. 111.
Literature
- Robert W. Sebest. Basic concepts of programming languages. - 5th ed. - M .: Williams, 2001. - 672 p. - ISBN 5-8459-0192-8 .