How are computer programming languages ​​different? Computer principles

💖 Like it? Share the link with your friends

Programming is a whole science that allows you to create computer programs. It includes a huge number of different operations and algorithms that form a single programming language. So, what is it and what are the programming languages? The article provides answers, as well as an overview list of programming languages.

The history of origin and change programming languages should be studied along with the history of development computer technology because these concepts are directly related. Without programming languages, it would be impossible to create any program for the operation of a computer, which means that the creation of computers would become a meaningless exercise.

The first machine language was invented in 1941 by Konrad Zuse, who is the inventor of the Analytical Engine. A little later, in 1943, Howard Aiken created the Mark-1 machine, capable of reading instructions at the level of machine code.

In the 1950s, there was an active demand for the development software, and machine language could not withstand large amounts of code, so a new way of communicating with computers was created. "Assembler" is the first mnemonic language to replace machine instructions. Over the years, the list of programming languages ​​is only increasing, because the scope of computer technology is becoming more extensive.

Classification of programming languages

On the this moment There are over 300 programming languages. Each of them has its own characteristics and is suitable for one specific task. All programming languages ​​can be divided into several groups:

  • Aspect-oriented (the main idea is the separation of functionality to increase the efficiency of program modules).
  • Structural (based on the idea of ​​creating a hierarchical structure of individual blocks of the program).
  • Logical (based on the theory of the apparatus of mathematical logic and resolution rules).
  • Object-oriented (in such programming, algorithms are no longer used, but objects that belong to a certain class).
  • Multi-paradigm (combine several paradigms, and the programmer himself decides which language to use in this or that case).
  • Functional (the main elements are functions that change value depending on the results of the calculations of the initial data).

Programming for beginners

Many people ask what is programming? Basically, it is a way to communicate with a computer. Thanks to programming languages, we can put before various devices certain tasks by creating special applications or programs. When studying this science at the initial stage, the most important thing is to choose suitable (interesting for you) programming languages. The list for beginners is below:

  • Basic was invented in 1964, belongs to the family of high-level languages ​​and is used to write application programs.
  • Python ("Python") is quite easy to learn due to its simple, readable syntax, but the advantage is that it can be used to create both ordinary desktop programs and web applications.
  • Pascal ("Pascal") is one of the oldest languages ​​(1969) created for teaching students. Its modern modification has strict typing and structure, but "Pascal" is a completely logical language that is understandable on an intuitive level.

Is not full list programming languages ​​for beginners. There are a huge number of syntaxes that are easy to understand and will definitely be in demand in the coming years. Everyone has the right to independently choose the direction that will be interesting for him.

Beginners have the opportunity to accelerate the learning of programming and its basics thanks to special tools. The main assistant is the Visual Basic integrated development environment for programs and applications (“Visual Basic” is also a programming language that inherited the style of the Basic language of the 1970s).

Programming language levels

All formalized languages ​​designed to create, describe programs and algorithms for solving problems on computers are divided into two main categories: low-level programming languages ​​(the list is given below) and high level. Let's talk about each of them separately.

Low-level languages ​​are designed to create machine instructions for processors. Their main advantage is that they use mnemonic notation, i.e. instead of a sequence of zeros and ones (from the binary number system), the computer remembers a meaningful abbreviated word from of English language. The most famous low-level languages ​​are "Assembler" (there are several subspecies of this language, each of which has much in common, but differs only in a set of additional directives and macros), CIL (available in the .Net platform) and JAVA Bytecode.

High-level programming languages: list

High-level languages ​​are designed for convenience and efficiency of applications, they are the exact opposite of low-level languages. Their distinguishing feature is the presence of semantic constructions that concisely and briefly describe the structures and algorithms of the programs. In low-level languages, their description in machine code would be too long and incomprehensible. High-level languages, on the other hand, are platform independent. Instead, compilers perform the translator function: they translate the program text into elementary machine instructions.

The following list of programming languages: C ("C"), C # ("C-sharp"), "Fortran", "Pascal", Java ("Java") - is among the most used high-level syntaxes. It has the following properties: these languages ​​work with complex structures, support string data types and file I/O operations, and also have the advantage of being much easier to work with due to readability and understandable syntax.

Most used programming languages

In principle, you can write a program in any language. The question is, will it work efficiently and without fail? That is why the most suitable programming languages ​​should be chosen for solving various problems. The popularity list can be summarized as follows:

  • OOP languages: Java, C++, Python, PHP, VisualBasic and JavaScript;
  • group of structural languages: Basic, Fortran and Pascal;
  • multi-paradigm: C#, Delphi, Curry and Scala.

Scope of programs and applications

The choice of the language in which this or that program is written depends largely on the area of ​​its application. So, for example, to work with the computer hardware itself (writing drivers and supporting programs), the best option would be C ("C") or C ++, which are included in the main programming languages ​​(see the list above). And for development mobile applications, including games, Java or C# ("C-sharp") should be selected.

If you have not yet decided which direction to work in, we recommend that you start learning with C or C ++. They have a very clear syntax, a clear structural division into classes and functions. In addition, knowing C or C ++, you can easily learn any other programming language.

A programming language is a formal sign system designed to write computer programs. A programming language defines a set of lexical, syntactic, and semantic rules that define appearance programs and actions that will be performed by the performer (computer) under its control.

A high-level programming language is a programming language designed for speed and ease of use by the programmer. The main feature of high-level languages ​​is abstraction, that is, the introduction of semantic constructs that briefly describe such data structures and operations on them, the descriptions of which in machine code (or other low-level programming language) are very long and difficult to understand.

Low-level programming language (low-level programming language) - a programming language close to programming directly in the machine codes of the real or virtual (for example, Java, Microsoft .NET) processor used. Mnemonic notation is usually used to designate machine instructions. This allows memorizing commands not as a sequence of binary zeros and ones, but as meaningful abbreviations of human language words (usually English).

Low level programming languages

The first computers had to be programmed with binary machine codes. However, programming in this way is a rather time-consuming and difficult task. To simplify this task, low-level programming languages ​​began to appear, which made it possible to set machine instructions in a form that was more understandable to humans. To convert them into binary code were created special programs- translators.

Fig.1. An example of machine code and its representation in assembler

Translators are divided into:

    compilers - convert the text of the program into machine code, which can be saved and then used without a compiler (an example is executable files with the extension *. exe);

    interpreters - turn part of the program into machine code, execute it, and then move on to the next part. In this case, every time the program is executed, the interpreter is used.

Assembly language is an example of a low level language. Low-level languages ​​are oriented to a specific type of processor and take into account its features, therefore, in order to port an assembler program to another hardware platform, it must be almost completely rewritten. There are also certain differences in the syntax of programs for different compilers. True, the central processing units for computers from AMD and Intel are practically compatible and differ only in some specific commands. But specialized processors for other devices, for example, video cards, phones contain significant differences.

Advantages

Low-level languages ​​create efficient and compact programs because the developer has access to all the capabilities of the processor.

Flaws

    A programmer working with low-level languages ​​must be highly qualified, have a good understanding of the structure of the microprocessor system for which the program is being created. So, if a program is created for a computer, you need to know the device of the computer and, especially, the device and features of its processor;

    the resulting program cannot be transferred to a computer or device with a different type of processor;

    significant development time for large and complex programs.

Low-level languages, as a rule, are used to write small system programs, device drivers, interface modules with non-standard equipment, programming specialized microprocessors, when the most important requirements are compactness, speed and the ability to directly access hardware resources.

Assembler is a low-level language that is still widely used today.

Learn the basic principles of PL. Here, of course, it all depends on the language you choose, but the PL also has common points, exclusively for writing useful programs important. The sooner you master all these concepts and learn how to put them into practice, the better for you and your programming skills. So here are just a few of the aforementioned "moments":

  • Variables - a variable can store and call changing data. Variables can be manipulated, variables have types (in a very simplified way - numbers, symbols, and so on), which determine the type of data stored in the variable. It is customary to set the names of variables in such a way that a person reading the source code can get an idea of ​​\u200b\u200bwhat is stored in the variable - this will make it easier to understand the logic of the program.
  • Conditional constructions (they are also conditional expressions) are an action that is performed if the expression or construction is true or false. The most common form of such expressions can be called the "If-Then" construction (if-then). If the expression is true (for example, if x = 5), then action #1 will occur, and if it is false (x != 5), then action #2 will occur.
  • Functions - in different programming languages ​​they are called differently: somewhere they are procedures, somewhere they are methods, somewhere they are callable units. In fact, functions are mini-programs that are part of big program. A function can be called multiple times, allowing the programmer to create complex programs.
  • Data entry is a fairly broad concept that is present in almost every PL. Its essence is the processing of data entered by the user and their storage. How the data will be collected depends on the program and the data input methods available to the user (from the keyboard, from a file, and so on). The concept of data input is closely related to the concept of data output - that is, how the data will be returned to the user (displayed on the screen, written to a file, and so on).
  • Install all required software. Many programming languages ​​need compilers - programs that translate program code into instructions that a computer can understand. However, there are other types of PLs (like Python) in which programs are executed immediately, and their compilation is not required.

    • Some PLs have so-called IDEs (Integrated Development Environment, Integrated Development Environment), which include a code editor, a compiler/interpreter, and a debugger (debugger). This gives the programmer the opportunity to work on the program, figuratively speaking, on the principle of one window. The IDE may also include visual representations of object and directory hierarchies.
    • There are also online code editors. These programs highlight the syntax of the program code in a slightly different way, and also offer the developer access to a number of useful and simple tools.
  • Programming language

    Programming language- a formal sign system designed to record computer programs. A programming language defines a set of lexical, syntactic and semantic rules that define the appearance of the program and the actions that the executor (computer) will perform under its control.

    • Function: a programming language is designed to write computer programs that are used to transmit instructions to a computer for performing a particular computing process and organizing control of individual devices.
    • A task: A programming language differs from natural languages ​​in that it is designed to transfer commands and data from a person to a computer, while natural languages ​​are used to communicate between people. You can generalize the definition of "programming languages" - this is a way of transmitting commands, orders, a clear guide to action; while human languages ​​also serve to exchange information.
    • Execution: A programming language may use special constructs to define and manipulate data structures and control the process of computation.

    Standardization of programming languages

    A programming language can be represented as a set of specifications that define its syntax and semantics.

    International standards have been created for many widely used programming languages. Special organizations regularly update and publish specifications and formal definitions of the corresponding language. Within the framework of such committees, the development and modernization of programming languages ​​continues and issues are resolved on the expansion or support of existing and new language constructs.

    Data types

    Modern digital computers are usually binary and data is stored in binary (binary) code (although implementations in other number systems are possible). This data typically reflects real-world information (names, bank accounts, measurements, etc.) representing high-level concepts.

    A special system by which data is organized in a program is type system programming language; the development and study of type systems is known as type theory. Languages ​​can be classified as systems with static typing and languages ​​from dynamic typing.

    Static-typed languages ​​can be further subdivided into languages ​​with mandatory declaration, where every variable and function declaration has a mandatory type declaration, and languages ​​with inferred types. Sometimes dynamically typed languages ​​are called latently typed.

    Data Structures

    Type systems in high-level languages ​​allow the definition of complex, composite types, so-called data structures. Typically, structural data types are formed as the Cartesian product of base (atomic) types and previously defined composite types.

    Basic data structures (lists, queues, hash tables, binary trees, and pairs) are often represented by special syntax constructs in high-level languages. Such data is structured automatically.

    Semantics of programming languages

    There are several approaches to defining the semantics of programming languages.

    The most widespread varieties of the following three: operational, derivational (axiomatic) and denotational (mathematical).

    • When describing semantics within the framework operational approach, the execution of programming language constructs is usually interpreted with the help of some imaginary (abstract) computer.
    • Derivative semantics describes the consequences of executing language constructs using the language of logic and setting pre- and postconditions.
    • denotational semantics operates with concepts typical of mathematics - sets, correspondences, as well as judgments, statements, etc.

    Programming paradigm

    A programming language is built according to one or another basic computing model and programming paradigm.

    Despite the fact that most languages ​​are focused on the imperative model of computing, given by the von Neumann computer architecture, there are other approaches. We can mention languages ​​with a stack computing model (Forth, Factor, PostScript, etc.), as well as functional (Lisp, Haskell, etc.) and logic programming (Prolog) and the REFAL language, based on the computing model introduced by the Soviet mathematician A A. Markov Jr.

    Currently, domain-specific, declarative and visual programming languages ​​are also actively developing.

    Ways to Implement Languages

    Programming languages ​​can be implemented as compiled and interpreted.

    A program in a compiled language with the help of a compiler (a special program) is converted (compiled) into machine code (a set of instructions) for a given type of processor and then assembled into an executable module that can be launched for execution as a separate program. In other words, the compiler translates the source code of the program from a high-level programming language into binary codes of processor instructions.

    If the program is written in an interpreted language, then the interpreter directly executes (interprets) the source text without prior translation. The program remains in its original language and cannot be run without an interpreter. The processor of a computer, in this connection, can be called an interpreter for machine code.

    The division into compiled and interpreted languages ​​is conditional. So, for any traditionally compiled language, such as Pascal, you can write an interpreter. In addition, most modern "pure" interpreters do not execute language constructs directly, but compile them into some high-level intermediate representation (for example, with variable dereference and macro expansion).

    For any interpreted language, you can create a compiler - for example, the language Lisp, originally interpreted, can be compiled without any restrictions. Code generated at runtime can also be dynamically compiled at runtime.

    As a rule, compiled programs run faster and do not require additional programs to execute, since they are already translated into machine language. At the same time, each time the program text is changed, it needs to be recompiled, which slows down the development process. In addition, a compiled program can only run on the same type of computer, and usually under the same operating system, for which the compiler was designed. To create an executable for a different type of machine, a new compilation is required.

    Interpreted languages ​​have some specific additional features(see above), in addition, programs on them can be run immediately after the change, which facilitates development. An interpreted language program can often be run in different types machines and operating systems without any extra effort.

    However, interpreted programs run noticeably slower than compiled programs, and they cannot run without an interpreter program.

    This approach, in a sense, allows you to use the advantages of both interpreters and compilers. It should be mentioned that there are languages ​​that have both an interpreter and a compiler (Forth).

    Symbols used

    Modern programming languages ​​are designed to use ASCII, that is, the availability of all graphic ASCII characters is a necessary and sufficient condition for writing any language constructs. Managers ASCII characters are used to a limited extent: only carriage return CR, line feed LF, and horizontal tab HT (sometimes also vertical tab VT and next page FF) are allowed.

    Early languages, which emerged during the 6-bit character era, used a more limited set. For example, the Fortran alphabet has 49 characters (including space): A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 = + - * / () . , $" :

    A notable exception is the APL language, which uses a lot of special characters.

    The use of non-ASCII characters (such as KOI8-R characters or Unicode characters) is implementation dependent: sometimes they are only allowed in comments and character/string constants, and sometimes they are also allowed in identifiers. In the USSR, there were languages ​​where everyone keywords were written in Russian letters, but such languages ​​​​did not gain much popularity (the exception is the Built-in programming language 1C: Enterprise).

    The expansion of the character set used is constrained by the fact that many software development projects are international. It would be very difficult to work with code where the names of some variables are written in Russian letters, others in Arabic, and still others in Chinese characters. At the same time, new generation programming languages ​​(Delphi 2006, Java) support Unicode to work with text data.

    Programming language classes

    see also

    Notes

    Literature

    • Hal Abelson, Gerald Jay Sussman. Structure and Interpretation of Computer Programs
    • Robert W. Sebesta. Basic concepts of programming languages ​​\u003d Concepts of Programming Languages ​​/ Per. from English. - 5th ed. - M .: Williams, 2001. - 672 p. - 5000 copies. - ISBN 5-8459-0192-8 (Russian), ISBN 0-201-75295-6 (English)
    • Wolfenhagen V. E. Designs of programming languages. Description methods. - M .: Center YurInfoR, 2001. - 276 p. - ISBN 5-89158-079-9
    • Parondzhanov V. D. How to improve the work of the mind. Algorithms without programmers - it's very simple! - M .: Delo, 2001. - 360 p. - ISBN 5-7749-0211-0
    • F. Biancuzzi, S. Worden. Programming Pioneers. Dialogues with the creators of the most popular programming languages. - St. Petersburg. : Symbol-Plus, 2010. - 608 p. - ISBN 978-5-93286-170-7

    Links

    • The Language List (English) - more than 2500 languages ​​with a brief description
    • Computer Languages ​​History (English) - history of programming languages ​​(from 1954 to May 2004) (contains a regularly updated chart)
    • Examples (English) - programming examples in 162 languages
    • Programming Language Popularity (eng.) - 2004 Programming Language Popularity Survey
    • 10 Programming Languages ​​to Learn (2006)
    • Programming Community Index (eng.) - a regularly updated ranking of the popularity of programming languages
    • Computer Language Shootout Benchmarks (English) - comparison of programming languages ​​in terms of efficiency
    • Programming Languages ​​that are Loved (English) - a comparison of programming languages ​​​​by "love" and "hate" to them

    Wikimedia Foundation. 2010 .

    Programming is a whole science that allows you to create computer programs. It includes a huge number of different operations and algorithms that form a single programming language. So, what is it and what are the programming languages? The article provides answers, as well as an overview list of programming languages.

    The history of the emergence and change of programming languages ​​should be studied along with the history of the development of computer technology, because these concepts are directly related. Without programming languages, it would be impossible to create any program for the operation of a computer, which means that the creation of computers would become a meaningless exercise.

    The first machine language was invented in 1941 by Konrad Zuse, who is the inventor of the Analytical Engine. A little later, in 1943, Howard Aiken created the Mark-1 machine, capable of reading instructions at the level of machine code.

    In the 1950s, there was an active demand for software development, and machine language could not withstand large amounts of code, so a new way of communicating with computers was created. "Assembler" is the first mnemonic language to replace machine instructions. Over the years, the list of programming languages ​​is only increasing, because the scope of computer technology is becoming more extensive.

    Classification of programming languages

    At the moment there are more than 300 programming languages. Each of them has its own characteristics and is suitable for one specific task. All programming languages ​​can be divided into several groups:

    • Aspect-oriented (the main idea is the separation of functionality to increase the efficiency of program modules).
    • Structural (based on the idea of ​​creating a hierarchical structure of individual blocks of the program).
    • Logical (based on the theory of the apparatus of mathematical logic and resolution rules).
    • Object-oriented (in such programming, algorithms are no longer used, but objects that belong to a certain class).
    • Multi-paradigm (combine several paradigms, and the programmer himself decides which language to use in this or that case).
    • Functional (the main elements are functions that change value depending on the results of the calculations of the initial data).

    Programming for beginners

    Many people ask what is programming? Basically, it is a way to communicate with a computer. Thanks to programming languages, we can set certain tasks for various devices by creating special applications or programs. When studying this science at the initial stage, the most important thing is to choose suitable (interesting for you) programming languages. The list for beginners is below:

    • Basic was invented in 1964, belongs to the family of high-level languages ​​and is used to write application programs.
    • Python ("Python") is quite easy to learn due to its simple, readable syntax, but the advantage is that it can be used to create both ordinary desktop programs and web applications.
    • Pascal ("Pascal") is one of the oldest languages ​​(1969) created for teaching students. Its modern modification has strict typing and structure, but "Pascal" is a completely logical language that is understandable on an intuitive level.

    This is not a complete list of programming languages ​​for beginners. There are a huge number of syntaxes that are easy to understand and will definitely be in demand in the coming years. Everyone has the right to independently choose the direction that will be interesting for him.

    Beginners have the opportunity to accelerate the learning of programming and its basics thanks to special tools. The main assistant is the Visual Basic integrated development environment for programs and applications (“Visual Basic” is also a programming language that inherited the style of the Basic language of the 1970s).

    Programming language levels

    All formalized languages ​​designed to create, describe programs and algorithms for solving problems on computers are divided into two main categories: low-level programming languages ​​(the list is given below) and high-level ones. Let's talk about each of them separately.

    Low-level languages ​​are designed to create machine instructions for processors. Their main advantage is that they use mnemonic notation, that is, instead of a sequence of zeros and ones (from the binary number system), the computer remembers a meaningful abbreviated word from the English language. The most famous low-level languages ​​are "Assembler" (there are several subspecies of this language, each of which has much in common, but differs only in a set of additional directives and macros), CIL (available in the .Net platform) and JAVA Bytecode.

    High-level programming languages: list

    High-level languages ​​are designed for convenience and efficiency of applications, they are the exact opposite of low-level languages. Their distinguishing feature is the presence of semantic constructions that concisely and briefly describe the structures and algorithms of the programs. In low-level languages, their description in machine code would be too long and incomprehensible. High-level languages, on the other hand, are platform independent. Instead, compilers perform the translator function: they translate the program text into elementary machine instructions.

    The following list of programming languages: C ("C"), C # ("C-sharp"), "Fortran", "Pascal", Java ("Java") - is among the most used high-level syntaxes. It has the following properties: these languages ​​work with complex structures, support string data types and file I/O operations, and also have the advantage of being much easier to work with due to readability and understandable syntax.

    Most used programming languages

    In principle, you can write a program in any language. The question is, will it work efficiently and without fail? That is why the most suitable programming languages ​​should be chosen for solving various problems. The popularity list can be summarized as follows:

    • OOP languages: Java, C++, Python, PHP, VisualBasic and JavaScript;
    • group of structural languages: Basic, Fortran and Pascal;
    • multi-paradigm: C#, Delphi, Curry and Scala.

    Scope of programs and applications

    The choice of the language in which this or that program is written depends largely on the area of ​​its application. So, for example, to work with the computer hardware itself (writing drivers and supporting programs), the best option would be C ("C") or C ++, which are included in the main programming languages ​​(see the list above). And for the development of mobile applications, including games, you should choose Java or C # ("C-sharp").

    If you have not yet decided which direction to work in, we recommend that you start learning with C or C ++. They have a very clear syntax, a clear structural division into classes and functions. In addition, knowing C or C ++, you can easily learn any other programming language.

    tell friends