Contacts

Program code in programming languages ​​extension. Modern high-level programming language: examples and comparisons. List of programming languages

In the fifties of the twentieth century, with the advent of vacuum tube computers, the rapid development of programming languages ​​began. Computers, which at that time cost significantly more than the development of any program, required highly efficient code. Such code was developed manually in Assembly language. In the mid-50s, under the leadership of John Backus, an algorithmic algorithm was developed for IBM. programming language FORTRAN. Despite the fact that there were already developments in languages ​​that converted arithmetic expressions into machine code, the creation of the FORTRAN language (FORmula TRANslator), which provided the ability to write a calculation algorithm using conditional statements and input/output operators, became the starting point of the era of algorithmic programming languages.

The FORTRAN language was required to create highly efficient code. Therefore, many language constructs were initially developed taking into account the IBM 407 architecture. The success of the development of this language led to the fact that manufacturers of other computing systems began to create their own versions of translators. With the goal of some possible unification of the language at that time, the FORTRAN IV language, developed in 1966, became the first standard, called FORTRAN 66.

As an alternative to the FORTRAN language, originally aimed at the IBM architecture, ALGOL (ALGOrithmic Language) was developed under the leadership of Peter Naur in the late 50s. The main goal pursued by the developers of this language was independence from the specific architecture of the computer system. In addition, the creators of the ALGOL language sought to develop a language convenient for describing algorithms and using a notation system close to that adopted in mathematics.

FORTRAN and ALGOL were the first languages ​​focused on programming calculations.

The PL 1 language, the first versions of which appeared in the early 60s, was initially aimed at the IBM 360 and expanded the capabilities of the FORTRAN language with some of the COBOL language developed in the same years. Despite the certain popularity of the PL/I language among programmers who worked on IBM computers and EC series machines, at present it is of purely theoretical interest.

In the late 60s, under the leadership of Nayard and Dahl, the Simula-67 language was developed, using the concept of user-defined data types. In fact, it is the first language to use the concept of classes.

In the mid-70s, Wirth proposed the Pascal language, which immediately became widely used. At the same time, at the initiative of the US Department of Defense, work began on creating a high-level language called Ada - in honor of Ada Lovelace, a programmer and daughter of Lord Byron. The creation of the language began with defining requirements and developing specifications. Four independent groups worked on the project, but they all used Pascal as a basis. In the early 1980s, the first industrial compiler for the Ada language was developed.

Universal programming language C was developed in the mid-70s by Denis Ritchie and Ken Thompson. The language became a popular systems programming language and was at one time used to write the kernel of the UNIX operating system. The C language standard was developed by an ANSI working group in 1982. The International Standard for the C language was adopted in 1990. The C language formed the basis for the development of the C++ and Java programming languages.

Along with algorithmic languages, languages ​​intended for processing business information, as well as artificial intelligence languages, developed in parallel. The first includes the COBOL language (COmmon Business Oriented Language), and the second includes the LISP (LISt Processing) and Prolog languages. The LISP language, developed in the 60s under the leadership of J. McCarthy, was the first functional list processing language that found widespread use in game theory.

With the advent of personal computers, languages ​​became components of integrated development environments. Languages ​​have appeared that are used in various office programs, for example VBA (Visual Basic for Application).

In the 90s, with the spread of the Internet, the possibility of distributed data processing expanded, which is reflected in the development of programming languages. There are languages ​​oriented towards creating server applications, such as Java, Perl and PHP, and document description languages ​​- HTML and XML. Traditional programming languages ​​C++ and Pascal are also undergoing changes: a programming language begins to mean not only the functionality of the language itself, but also the class libraries provided by the programming environment. The emphasis is shifting from the specification of the programming languages ​​themselves to the standardization of the mechanisms for interaction of distributed applications. New technologies are emerging - COM and CORBA, which specify the interaction of distributed objects.

Areas of application of programming languages

Currently, programming languages ​​are used in a wide variety of areas of human activity, such as:

  • scientific computing (languages ​​C++, FORTRAN, Java);
  • system programming (languages ​​C++, Java);
  • information processing (languages ​​C++, COBOL, Java);
  • artificial intelligence (LISP, Prolog);
  • publishing activities (Postscript, TeX);
  • remote information processing (Perl, PHP, Java, C++);
  • description of documents (HTML, XML).

Over time, some languages ​​developed, acquired new features and remained in demand, while others lost their relevance and today are, at best, of purely theoretical interest. This is largely due to factors such as:

  • the presence of a programming environment that supports the development of applications in a specific programming language;
  • ease of maintenance and program testing;
  • the cost of development using a specific programming language;
  • clarity and orthogonality of language structures;
  • application of an object-oriented approach.

Most modern computer programs are written using high-level languages. It is noteworthy that many of them were developed back in the 60s and 70s, but are still relevant today. What other facts about high-level languages ​​can we note? What are the most common types of relevant solutions?

The essence of high-level programming languages

A high-level programming language is a tool classified as machine-independent. What does this mean? The fact is that programming languages ​​are divided into several categories.

There is machine code: a set of algorithms that are designed to control the user directly with the hardware elements of the computer. Their essence will be completely machine-dependent: only certain algorithms will be suitable for specific types of PCs.

There are assembly languages. In fact, they are an add-on to those designed for low-level control of PC hardware components through machine code. But for many reasons, assembly languages ​​are also usually classified as machine-dependent. As a rule, they are adapted to a specific type of PC hardware component. Their main task is to make it easier for the user to control the computer through appropriate low-level communications.

In turn, a high-level programming language allows the user to interact with the PC, regardless of what specific hardware is installed on the computer. Therefore, it should be classified as machine-independent. When writing operating systems, a high-level programming language is most often used. But there are OSes that are written in assembly language. Low and high level programming languages ​​can be used simultaneously. A person, giving high-level commands to a PC, must, one way or another, convey them to specific hardware components, and this function can be implemented by using assembly languages ​​simultaneously with high-level ones that are involved in the structure of the operating system.

Translators

The most important elements that are included in high-level programming languages ​​are translators. Their function may vary. Among the key areas of application of translators is the “translation” of commands generated in a high-level programming language into machine code that is understandable by a specific PC hardware component, for example, a processor. Translators that perform this function are also called compilers. There is another type of corresponding components - interpreters. They are intended, in turn, to “translate” high-level commands into those that are understandable to the operating system or any program.

Classification of high-level languages

High-level programming languages ​​can be classified in different ways. There is a common scheme according to which they are divided into the following main varieties:

Procedural-oriented (used as a tool when processing information at any stage of calculations);

Problem-oriented (used as a means of solving industry and application problems that arise as the areas of PC application expand);

Object-oriented (may be special cases of languages ​​of the first two types, however, they are adapted for use by a wide range of developers with different levels of training, for example, in the form of a solution with a visual interface).

Let us now consider some historical and modern high-level programming languages ​​that correspond to this classification.

Procedural-oriented languages

These include Fortran. It is considered the first high-level programming language created for widespread use. Characterized by a simple structure. BASIC is also a procedurally oriented language. It is considered one of the most commonly used in teaching programming. An example of another procedurally oriented language is SI. It was originally created for the UNIX OS. On its basis, the C++ language was subsequently created, supplemented with object-oriented programming tools. Another language belonging to this category is Pascal. Often also used when teaching programming. The capabilities of this language allow it to be used as a very powerful tool for developing professional types of software.

Problem-oriented languages

These include Lisp and Prolog. The first language was developed in 1962, a few years after the creation of Fortran. Considered, therefore, as the second in history. Actively used as a tool for programmers to work with character strings. In practice, Lisp was used in systems classified as expert systems, as well as those intended for analytical computing. Prolog has found widespread use in the field of logic programming. In practice, it is most often involved in managing artificial intelligence algorithms in relevant systems.

Object-oriented languages

Let us now study examples of high-level programming languages ​​that fall into the object-oriented category. Among these are Visual Basic, Delphi, Visual Fortran, the above-mentioned C++, as well as Prolog ++. In fact, they all contain procedurally oriented languages ​​at their core. However, it is expected that they will be significantly supplemented with visual controls for the purpose of subsequent mastery of the necessary algorithms by developers accustomed to other tools. Thus, the first high-level programming language, Fortran, can be quickly learned by IT specialists using the capabilities of Visual Fortran. Using a similar method, you can quickly master BASIC or Prolog.

In turn, when using Delphi, programming is carried out in the high-level language Object Pascal. There are a large number of other software development environments classified as object-oriented languages. This area of ​​software development technology is actively developing.

Fortran and Lisp are the first and second high-level languages

Let's study in more detail how the first high-level programming language, Fortran, appeared, as well as Lisp, which is considered the second. In 1954, developers from IBM, led by John Backus, created a language through which programmers were able to greatly facilitate interaction with a PC, which until then was carried out through machine commands or assembler. It was named Fortran and soon became known in the USSR under its Russified name. Fortran became a popular tool for scientific computing.

The main revolutionary element proposed by IBM specialists to the community was, in fact, that same compiler, designed to be an alternative to assembler. In the first years of writing programs using Fortran, many developers considered the compiler to be a not entirely successful solution, primarily from the point of view of labor costs. Many machine codes, indeed, were compiled more simply than when using a translator. However, as computer performance rapidly increased, programmers began to realize that without using a compiler, it was extremely difficult to create effective software that would fully utilize the computing power of a PC. Thus, the initiatives of developers from IBM were further developed. The basic syntactic structures of the high-level programming language Fortran in many cases began to be used as base ones when creating new solutions.

An example of achieving practical results in the development of concepts embedded in Fortran is the creation of Lisp. This language was developed in 1958, however, it became widely known a little later - in 1960. Lisp was developed by John McCarthy and published in one of the popular magazines for IT specialists. The main purpose of the language in question is list processing. Lisp has become popular among developers of artificial intelligence systems. On its basis, languages ​​such as Planner, Scheme, and Common Lisp were created. Lisp has also had a significant influence on many modern software development tools. The structure of high-level programming languages ​​popular today is largely based on Fortran and Lisp algorithms.

It will be interesting, however, to consider other approaches to the classification of the software development tools under consideration.

Universal high-level languages

Thus, modern experts identify universal high-level languages. These include, in particular, those that were developed in the 60s. Their key characteristics:

Focus on a wide range of tasks (primarily those related to computing);

A large number of language constructs and algorithms;

Significance not only for its time, but also for the modern stage of development of computer technology;

Support in relevant languages ​​for imperative methodology.

Universal languages ​​are fundamental in the relevant field of IT development. It can be noted that so far they have no direct analogues in terms of internal structure. Actually, this largely explains the relevance of using the corresponding languages ​​in modern object-oriented interfaces. Also common in the noted languages ​​is the data type. This factor largely determines their versatility. Among the most remarkable properties of languages ​​belonging to the category of universal languages ​​is continuity. Thus, historically, later languages, as a rule, were based on the concepts of their predecessors.

Unique languages

Some IT experts classify “unique languages” as a separate category. These include: APL, Cobol, Forth, SETL, and CLU. What are their specifics?

The most important aspect of APL is the use of arrays (vectors and matrices) as a key structural type. The specificity of the Cobol language is its focus on the commercial sphere. Thus, it is advisable to use it when solving problems related to a standardized format for presenting results. The Forth language is characterized by the use of postfix notation of programs, as well as the use of stack notation. SETL uses collections of values ​​as one of its key data types. CLU is also a high-level programming language. Its main feature is the use of the concept of working with abstract data types. Many IT specialists see the logical emergence of new solutions based on unique languages ​​- such as, for example, Object-Oriented Cobol.

Parallel programming tools

This category can include a huge number of solutions. In turn, parallel programming languages ​​can have a large number of bases for classification. For example, a method of organizing processes. This basis involves the classification of parallel programming tools based on the presence in them of:

Coroutine;

Branches;

Associations;

Parallel brackets;

Algorithms for working with processes.

Another basis for classifying languages ​​of the type under consideration is methods of process synchronization. Appropriate solutions could therefore include:

Semaphores;

Monitors;

- “rendezvous”;

Critical areas;

Remote procedure call;

Transactions classified as atomic.

The languages ​​of the type under consideration include Modula-2, BLISS, Concurrent Pascal, DP, Argus.

C family of languages

Above, we looked at a solution such as C as an example of a high-level programming language. In fact, it forms a whole family. The languages ​​belonging to it are proprietary constructs of C. Thus, its addition of various object-oriented components led to the development of C++. After significant filtering of a number of C constructs, the Java language emerged. It can be noted that Java was created largely under the influence of the concepts of the Oberon project, which is led by Niklaus Wirth, the creator of the Pascal language. Is it high-level JavaScript? Of course, yes, despite its narrow application - as a tool for developing web pages. But high-level programming languages ​​do not include, in particular, HTML, XML and SGML. They are classified as hypertext markup tools.

Pascal family of languages

The Pascal high-level programming languages ​​also form a separate family. Based on Pascal, Oberon was actually created, classified as an object-oriented language. A key feature of Oberon is its ability to provide type safety. Apart from Oberon, languages ​​in the Pascal family include Modula-2, as well as Component Pascal.

Ada family of languages

Fundamental in the corresponding category of languages ​​- Ada, ordered for the needs of the US Department of Defense. It was created in the late 70s - early 80s. It is characterized by a large number of functions, capabilities, and versatility. The Ada family of languages ​​includes solutions such as Cedar, Modula 3.

Simula family of languages

The Simula language is common in programming industries related to simulation modeling. The specificity of the corresponding solutions lies in the use of a specific core. Its use allows the use of various extensions adapted to certain areas of application. Based on Simula, the object-oriented language Smalltalk was created, as well as BETA, which is characterized by the ability to combine algorithms that reflect working with data, procedures, and management within a single abstraction. BETA objects can be viewed in different contexts, such as variables, functions, or concurrent systems.

Course work

on the topic: “Programming languages”


Introduction

1. Programming languages

1.1 History of the development of programming languages

2. Review of modern programming languages

2.1 C its varieties

2.2 Pascal

2.3 Fortran

2.4 BASIC

Conclusions and offers

List of used literature

Introduction

At the present stage of development of computer technology, it is impossible to imagine any highly qualified specialist who does not know information technology. Since the activity of any subject largely depends on the degree of knowledge of information, as well as the ability to use it effectively. For free orientation in information flows, a modern specialist of any profile must be able to receive, process and use information, primarily with the help of computers, as well as telecommunications and other new means of communication, including the ability to handle programming languages.

The relevance of this topic is due to the fact that the progress of computer technology has determined the process of the emergence of new and diverse sign systems for recording algorithms - programming languages.

The object of the study was programming languages ​​and the history of the development of programming languages.

The purpose of the course work is to study the classification of programming languages ​​and their development.

Research objectives:

1. View general information and levels of programming languages.

2. View the history of the development of programming languages.

3. Review modern programming languages.

Research objectives:

1. Introduction to programming languages.

2. Consideration of the history of the development of programming languages.

3. Review of modern programming languages.

The first chapter discusses general information about programming languages ​​and the history of their development.

The second chapter provides an overview of modern programming languages.

This course work used research methods.

Technical means used: PC: Core 2 DuoE6600 2.4 GHz 2 x 4 MB L2; 2 x 1024 MB DDR3-1333 MHz; NVIDIAGeForce 8600 GT 512 MB; HDDHitachiDeskstar 7K1000 1TB; Printer: Canon LBP3010.

Windows OS software XPProfessionalSP3. This course work was completed in Microsoft Word 2003, and other programs were also used: Microsoft PowerPoint, Nero StartSmart.

1. Programming languages

A programming language is a notation system used to accurately describe computer programs or algorithms. Programming languages ​​are artificial languages. They differ from natural languages ​​in the limited number of “words” and very strict rules for writing commands (operators). Therefore, when used for their intended purpose, they do not allow for the free interpretation of expressions characteristic of natural language.

It is possible to formulate a number of requirements for programming languages ​​and classify languages ​​according to their features.

Basic requirements for programming languages:

clarity - the use in the language, if possible, of already existing symbols that are well known and understandable to both programmers and computer users;

unity - the use of the same symbols to denote the same or related concepts in different parts of the algorithm. The number of these characters should be as minimal as possible;

flexibility - the possibility of a relatively convenient, uncomplicated description of common methods of mathematical calculations using the limited set of visual means available in the language;

modularity - the ability to describe complex algorithms in the form of a set of simple modules that can be compiled separately and used in various complex algorithms;

unambiguity - unambiguous recording of any algorithm. Its absence could lead to incorrect answers when solving problems.

Currently, there are several hundred actually used programming languages ​​in the world. Each has its own area of ​​application.

Any algorithm is a sequence of instructions, following which you can move from the initial data to the result in a finite number of steps. Depending on the degree of detail of the instructions, the level of the programming language is usually determined - the less detail, the higher the level of the language.

Based on this criterion, the following levels of programming languages ​​can be distinguished:

· machine;

· machine-oriented (assemblers);

· machine-independent (high-level languages).

Machine languages ​​and machine-oriented languages ​​are low-level languages ​​that require specifying fine details of the data processing process. High-level languages, on the other hand, imitate natural languages ​​by using some spoken language words and common mathematical symbols. These languages ​​are more human-friendly.

Different types of processors have different instruction sets. If a programming language is focused on a specific type of processor and takes into account its features, then it is called a low-level programming language. In this case, “low level” does not mean “bad”. This means that the language operators are close to machine code and are focused on specific processor commands.

When programming in machine language, the programmer can control every instruction and every memory cell and use all the capabilities of available machine operations. But the process of writing a program in machine language is very time-consuming and tedious. The program turns out to be cumbersome, difficult to view, and difficult to debug, change, and develop.

Therefore, in the case when it is necessary to have an effective program that takes into account the specifics of a particular computer to the maximum extent, instead of machine languages, machine-oriented languages ​​(assemblers) that are close to them are used.

Assembly language is a low-level machine-specific language in which short mnemonic names correspond to individual machine instructions. Used to represent programs written in machine code in human-readable form.

Assembly language allows the programmer to use text mnemonic (that is, easily memorized by a person) codes, assign symbolic names to computer and memory registers at his discretion, and also set addressing methods that are convenient for himself. In addition, it allows you to use different number systems (for example, decimal or hexadecimal) to represent numeric constants, use comments in the program, etc.

Low-level languages ​​create very efficient and compact programs because the developer has access to all the capabilities of the processor. On the other hand, it requires a very good understanding of the computer, makes it difficult to debug large applications, and the final program cannot be transferred to a computer with a different type of processor. Such languages ​​are usually used to write small system applications, device drivers, and interface modules with non-standard equipment, when compactness, performance, and the ability to directly access hardware resources become the most important requirements. In some areas, such as computer graphics, libraries are written in assembly language to efficiently implement computationally intensive image processing algorithms.

Thus, programs written in assembly language require significantly less memory and execution time. A programmer's knowledge of assembly language and machine code gives him an understanding of the machine's architecture. Although most software professionals develop programs in high-level languages, the most powerful and efficient software is written entirely or partially in assembly language.

High-level languages ​​were developed in order to free the programmer from taking into account the technical features of specific computers and their architecture. The level of language is characterized by the degree of its closeness to natural, human language. Machine language is not similar to human language; it is extremely poor in its visual means. The means of writing programs in high-level languages ​​are more expressive and familiar to humans. For example, a calculation algorithm using a complex formula is not divided into separate operations, but is written compactly in the form of a single expression using familiar mathematical symbols. It is much easier to create your own or understand someone else’s program in this language.

An important advantage of high-level languages ​​is their universality and independence from computers. A program written in such a language can be executed on different machines. The program compiler does not need to know the command system of the computer on which he intends to carry out calculations. When moving to another computer, the program does not require modification. Such languages ​​are not only a means of communication between a person and a machine, but also between people. A program written in a high-level language can be easily understood by any specialist who knows the language and the nature of the task.

Thus, we can formulate the main advantages of high-level languages ​​over machine languages:

The high-level language alphabet is much wider than the machine language alphabet, which significantly increases the clarity of the program 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 certain class;

the sentence format is quite flexible and convenient to use, which allows you to specify a fairly meaningful stage of data processing using one sentence;

the required operations are specified using generally accepted mathematical notations;

Before you want to learn any programming language, you need to know a little about their history and where they are used.

I present to you a brief overview of 25 famous programming languages. Starting from the most famous to the least popular. The article is made for beginners in the field of programming. You can read about each language and choose the one you like best to study.

Before you start learning programming languages, I recommend that you take a course on .

1. JavaScript

Prototype-oriented scripting programming language. JavaScript was originally created to make web pages “alive.” In the browser, they connect directly to the HTML and, as soon as the page loads, they are immediately executed.

When JavaScript was created, it originally had a different name: “LiveScript.” But then the Java language was very popular, and marketers decided that a similar name would make the new language more popular.

It was planned that JavaScript would be a kind of “little brother” to Java. However, history has its own way, JavaScript has grown a lot, and now it is a completely independent language, with its own specification and has nothing to do with Java.

2. Java


A strongly typed object-oriented programming language. Java applications are typically translated into custom bytecode so they can run on any computer architecture using the Java Virtual Machine.

The advantage of this method of executing programs is the complete independence of the bytecode from the operating system and hardware, which allows you to run Java applications on any device for which a corresponding virtual machine exists. Another important feature of Java technology is its flexible security system, in which program execution is completely controlled by the virtual machine.

The language was originally called Oak and was developed by James Gosling for programming consumer electronic devices. It was later renamed Java and used to write client applications and server software.

3.PHP


It is a common, open-source, general-purpose interpreted language (scripting language). PHP was created specifically for web development and its code can be embedded directly into HTML code. The language's syntax comes from C, Java and Perl, and is easy to learn.

The main purpose of PHP is to provide web developers with the ability to quickly create dynamically generated web pages, but the scope of PHP is not limited to this.

4.Python

A high-level general-purpose programming language aimed at improving developer productivity, code readability, and web application development. The Python core syntax is minimalist. Code in Python is organized into functions and classes, which can be combined into modules.

5. C#


Object-oriented programming language. Developed in 1998-2001 by a group of engineers led by Anders Hejlsberg at Microsoft as an application development language for the Microsoft .NET Framework. C# belongs to a family of languages ​​with a C-like syntax, of which its syntax is closest to C++ and Java.

The language has static typing, supports polymorphism, operator overloading, delegates, attributes, events, properties, generic types and methods, iterators, anonymous functions with support for closures, LINQ, exceptions, comments in XML format.

6. C++


A compiled, statically typed general-purpose programming language. It is one of the most widely spoken languages ​​in the world. Google Chrome, Mozilla Firefox, Winamp and the Adobe product line were developed using C++. Additionally, some modern games and operating systems have been developed in C++ due to its fast processing and compilation.

7. Ruby


A simple and readable programming language aimed at developing web applications. Designed by Yukihiro Matsumto in 1995. The language has an operating system-independent implementation of multithreading, strict dynamic typing, and a garbage collector.

The main purpose of Ruby is to create simple and at the same time understandable programs, where it is not the speed of the program that is important, but the short development time, clarity and simplicity of the syntax. The language follows the principle of "least surprise": the program should behave as the programmer expects.

8.CSS


Cascading Style Sheets are a formal language for describing the appearance of a document written using a markup language.
It is primarily used as a means of describing and designing the appearance of web pages written using HTML and XHTML markup languages, but can also be applied to any XML documents.

9. C


A compiled, statically typed, general-purpose programming language. The C language was developed by Dennis Ritchie in 1972 at Bell Labs. It is the predecessor of programming languages ​​such as C++, Java, C#, JavaScript and Perl. For this reason, learning this language leads to understanding other languages. The C language is used for developing low-level applications, as it is considered to be closest to hardware.

10. Objective-C


A compiled object-oriented programming language used by Apple Corporation, built on the C language and Smalltalk paradigms. The Objective-C language is a superset of the C language, so C code is fully understandable by the Objective-C compiler. The language is used primarily for Mac OS X (Cocoa) and GNUstep - implementations of the object-oriented OpenStep interface. The language is also used for iOS (Cocoa Touch).

11.Shell

It is not so much a language as it is a command interpreter (command language). Its scripts are used to automate software updates. Contains standard constructs for loops, branching, and function declarations. The UNIX family of operating systems uses SHELL as the standard job control language.

12. R


A programming language for statistical data processing and graphics, as well as a free and open-source computing environment under the GNU project. R is widely used as statistical software for data analysis and has become the de facto standard for statistical programs. R uses a command line interface.

13. Perl


A high-level interpreted dynamic general-purpose programming language. The name of the language is an acronym that stands for Practical Extraction and Report Language - “a practical language for extracting data and writing reports.” The main feature of the language is its rich capabilities for working with text, including working with regular expressions built into the syntax. Currently, it is used for a wide range of tasks, including system administration, web development, network programming, games, bioinformatics, graphical user interface development.

14. Scala


A multi-paradigm programming language designed to be concise and type-safe for easy and fast creation of component-based software, combining the capabilities of functional and object-oriented programming. Scala programs are similar to Java programs in many ways, and can freely interact with Java code.

15. Go


A compiled multi-threaded programming language developed by Google. The Go language was developed as a systems programming language for creating highly efficient programs that run on modern distributed systems and multi-core processors. It can be seen as an attempt to create a replacement for the C language. During development, special attention was paid to ensuring highly efficient compilation. Go programs are compiled into object code and do not require a virtual machine to run.

16.SQL

Structured Query Language. a formal, non-procedural programming language used to create, modify, and manipulate data in an arbitrary relational database managed by an appropriate database management system. SQL is primarily an information logical language designed to describe, modify, and retrieve data stored in relational databases. Each SQL statement is either a request for data from a database or a call to the database that causes data in the database to change.

17. Haskell


A standardized, pure, functional, general-purpose programming language. It is one of the most common programming languages ​​with support for lazy computing. A distinctive feature of the language is its serious attitude to typing. Haskell is an excellent language for learning and experimenting with complex functional data types.

18. Swift


An open, multi-paradigm, compiled, general-purpose programming language. Created by Apple primarily for iOS and OS X developers, Swift works with the Cocoa and Cocoa Touch frameworks and is compatible with Apple's core Objective-C codebase. Swift was intended to be an easier-to-read and more error-resistant language than its predecessor, Objective-C. Swift borrows quite a lot from Objective-C, but it is defined not by pointers, but by the types of variables that the compiler processes. Many scripting languages ​​work on a similar principle.

19. Matlab


A high-level interpreted programming language that includes matrix-based data structures, a wide range of features, an integrated development environment, object-oriented capabilities, and interfaces to programs written in other programming languages. Programs written in MATLAB are of two types - functions and scripts. Functions have input and output arguments, as well as their own workspace for storing intermediate calculation results and variables. Scripts use a common workspace. Both scripts and functions are saved as text files and compiled into machine code dynamically.

20. Visual Basic


A programming language and integrated software development environment developed by Microsoft Corporation. The Visual Basic language inherited the spirit, style and syntax of its ancestor - the BASIC language, which has many dialects. At the same time, Visual Basic combines the procedures and elements of object-oriented and component-oriented programming languages.

Visual Basic is also a good tool for quickly developing RAD database applications for Microsoft Windows operating systems. Many ready-made components supplied with the environment are designed to help the programmer immediately begin developing the business logic of the application, without diverting his attention to writing program launch code.

21. Delphi


An imperative, structured, object-oriented programming language with strong static variable typing. The main area of ​​use is writing application software.

Today, along with support for the development of 32 and 64-bit programs for Windows, it is possible to create applications for Apple Mac OS X, as well as for Google Android (directly executed on an ARM processor).

22. Groovy


An object-oriented programming language designed for the Java platform as a complement to the Java language with capabilities from Python, Ruby, and Smalltalk. Groovy uses a Java-like syntax with dynamic compilation of JVM bytecode and works directly with other Java code and libraries. The language can be used in any Java project or as a scripting language.

23. Visual Basic .NET


An object-oriented programming language, which can be considered as the next round of evolution of Visual Basic, implemented on the Microsoft .NET platform. VB.NET is not backward compatible with an earlier version (Visual Basic 6.0). Development of projects of older versions (*.vbp) is possible only after their preliminary conversion to the VB.NET format by a special wizard (Migration Wizard); however, after conversion, significant manual modification of the texts is required.

24.D

A multi-paradigm compiled programming language created by Walter Bright of Digital Mars. D was originally conceived as a reengineering of the C++ language, however, despite the significant influence of C++, it is not a variant of it. The language was also influenced by concepts from the programming languages ​​Python, Ruby, C#, Java, and Eiffel.

25. Assembler


A low-level machine-oriented language with commands that do not always correspond to machine commands, which can provide additional features such as macros; autocode extended by high-level programming language constructs, such as expressions, macros, and means of ensuring program modularity.

Assembly language is a notation system used to represent programs written in machine code in human-readable form. Assembly language allows the programmer to use alphabetical mnemonic operation codes, assign symbolic names to computer registers and memory at his discretion, and also set addressing schemes that are convenient for himself. In addition, it allows the use of different number systems to represent numeric constants and makes it possible to label program lines with symbolic names so that they can be referenced.

I did not take all the languages ​​because... they are not so much in demand among professional programmers. My task is completed, now all you have to do is choose the appropriate language and conquer it. Good luck to you in your endeavors.

1.1 Microsoft Visual Studio C++

Microsoft Visual Studio is a line of Microsoft products that includes an integrated software development environment and a number of other tools.

Visual Studio includes one or more of the following:

Visual Basic .NET, and before its appearance - Visual Basic;

Visual C++;

Visual C#.

Many delivery options also include:

Microsoft SQL Server or MSDE;

Visual Source Safe - file-server version control system;

In the past, Visual Studio also included the following products:

Visual InterDev;

Visual J++;

Visual J#;

Visual FoxPro.

The most significant versions of the package:

Visual Studio 97 was the first version of Visual Studio released and was the first to bring together various software development tools. It was released in two versions: Professional and Enterprise. It included Visual Basic 5.0, Visual C++ 5.0, Visual J++ 1.1, Visual FoxPro 5.0, and the ASP development environment - Visual InterDev - appeared for the first time. Visual Studio 97 was Microsoft's first attempt to create a single development environment for different programming languages: Visual C++, Visual J++, Visual InterDev, and MSDN all shared one environment called Developer Studio. Visual Basic and Visual FoxPro used separate development environments.

Visual Studio 6.0 - released in June 1998 - the latest version of Visual Studio running on the Win9x platform. Still popular among programmers using Visual Basic. This version was the main application development environment for Windows from Microsoft, before the advent of the .NET platform.

Visual Studio .NET (codename Rainier; internal version 7.0) - released February 2002 (includes .NET Framework 1.0). Service Pack 1 for Visual Studio .NET (2002) was released in March 2005.

Visual Studio .NET 2003 (codename Everett; internal version 7.1) - released April 2003 (includes .NET Framework 1.1). Service Pack 1 for Visual Studio .NET 2003 was released on September 13, 2006.

Visual Studio 2005 (codename Whidbey; internal version 8.0) - released late October 2005 (includes .NET Framework 2.0). At the beginning of November 2005, a series of products in the Express edition were also released: Visual C++ 2005 Express, Visual Basic 2005 Express, Visual C# 2005 Express, etc. On April 19, 2006, the Express edition became free. Service Pack 1 for VS2005 and all Express editions was released on December 14, 2006. An additional patch for SP1 that solves the compatibility problem with Windows Vista was released on June 3, 2007.

Visual Studio 2008 (codename Orcas) - released November 19, 2007, along with the .NET Framework 3.5. Aimed at creating applications for Windows Vista (but also supports XP), Office 2007 and web applications. Includes LINQ, new versions of C# and Visual Basic. Visual J# was not included in the studio. Since October 28, 2008, the Russian version has been available for the first time.

The successor product to Visual Studio 2008 is codenamed Hawaii. On September 29, 2008, an announcement appeared introducing some of the innovations that will appear in Visual Studio 2010 and the .NET Framework 4.0.

An application developer who decides to use the services of Visual Studio.Net 7.0 has at his disposal quite a lot of new technologies and tools that allow him to quickly and efficiently create ordinary Windows applications, which are now commonly called desktop applications, as well as web applications and web services. Microsoft has added to the programmer's arsenal a new language, C# (pronounced "C sharp"), which, as experts promise, can speed up the development cycle of complex projects several times.

The main news that should grab your attention is that Visual C++, Visual Basic and C# use the same IDE (Integrated Development Environment), which makes it possible to create complex projects using different languages ​​(mixed-language solutions ). The .Net multilingual development environment (.Net Framework) is the sum of three components:

a common runtime library for the considered set of languages ​​(Common Language Runtime);

unified library of developer classes (Unified Programming Classes);

web application development model (Active Server Pages.Net).

The first component is the runtime library (Common Language Runtime, abbreviated CLR), which functions both at the runtime and at the development stage. During code execution, it monitors the dynamics of multi-threaded applications, ensures the interconnection of processes, maintains their security, and automates the procedures for allocating and freeing memory. At the development stage, the CLR automates typical tasks solved by the programmer, greatly simplifying the use of new technologies. Particularly noted are the advantages obtained when creating components of the COM standard (Component Object Model, abbreviated as COM - Multi-Component Object Model).

The second component (Unified Programming Classes) provides the developer with a unified, object-oriented, extensible class library, which, together with other resources, is part of the Application Programming Interface (API). It combines elements of MFC (Microsoft Foundation Classes), WFC (Windows Foundation Classes) and part of the API used by Visual Basic.

The third component (ASP.Net) is an add-on to classes, which makes it possible to use object-oriented technology when developing standard HTML interface elements. Actually executed on the server side, these elements expose user interface functions as HTML code. However, when developing a server, it is possible to use the powerful apparatus provided by the object programming model. The result is a dramatic simplification of the process of building web applications. In addition to this, ASP.Net supports a fairly new concept or model of program development. You've probably heard of it as thin client technology. The main essence of this model is the provision of code to the user not in the form of an installed product, but in the form of a temporary service.

Code that is created based on the .Net Framework development environment is called managed code (managed code) unlike regular, unmanaged code (unmanaged code). In .Net mode, the compilers of the considered languages ​​produce metadata (metadata), which accompany the code itself. This means that they generate additional information describing data types, objects, and references. The runtime library (Common Language Runtime) uses metadata to find and load objects, run functions, pass parameters, and place objects in memory.

An important function that the runtime library performs is to automatically free up memory occupied by objects that are no longer in use. This innovation is designed to increase the reliability of both individual components and the entire application being developed. Data whose lifetime is managed in this way is called managed data. (managed data). If your code is managed (managed code), then you may or may not use managed data. Moreover, you may not know whether your data is managed.

The Common Runtime Library (CLR) simplifies the creation of applications and their components that are developed in different languages ​​and targeted to use the CLR. These modules can be integrated in one project and interact with each other as if they were created in the same language. For example, you can declare a class, and then create a class derived from it in another language. You can simply use class methods within a module written in another language. This integration is possible because compilers and tools in different languages ​​share a common type system defined in the CLR, as well as new rules of the game adopted during its development.

1.2 C++Builder

Borland C++ Builder is a recently released rapid application development tool from Borland that allows you to create applications in C++ using the Delphi development environment and component library. This article discusses the C++ Builder development environment and the basic techniques used in user interface design.

C++ Builder is an SDI application whose main window contains a customizable toolbar (left) and a component palette (right). In addition, by default, when you launch C++ Builder, the Object Inspector window (on the left) and the New Application form (on the right) appear. Below the application form window is the code editor window.


Fig.1. C++Builder development environment

Forms are the core of C++ Builder applications. Creating an application's user interface involves adding C++ Builder object elements, called components, to the form window. C++ Builder components are located on the component palette, designed as a multi-page notepad. An important feature of C++ Builder is that it allows you to create your own components and customize the component palette, as well as create different versions of the component palette for different projects.

Components are divided into visible (visual) and invisible (non-visual). Visual components appear at runtime just as they do at design time. Examples are buttons and editable fields. Non-visual components appear during design as icons on a form. They are never visible at runtime, but have certain functionality (for example, they provide access to data, call standard Windows 95 dialogs, etc.)


Rice. 2. Example of using visible and invisible components

To add a component to a form, you can select the desired component in the palette with the mouse and click the left mouse button in the desired location of the designed form. The component will appear on the form, and then you can move it, change its size and other characteristics.

Each C++ Builder component has three types of characteristics: properties, events, and methods.

If you select a component from the palette and add it to a form, the Object Inspector will automatically show the properties and events that can be used with that component. At the top of the object inspector there is a drop-down list that allows you to select the desired object from those available on the form.

Properties are attributes of a component that determine its appearance and behavior. Many component properties in the properties column have a default value (for example, button height). The component's properties are displayed on the Properties page. The Object Inspector displays published properties of components. In addition to published properties, components can, and most often do, have public, published properties that are only available while the application is running. The Object Inspector is used to set properties at design time. The list of properties is located on the properties page of the Object Inspector. You can define properties at design time or write code to modify the properties of a component at runtime.

When defining the properties of a component at design time, you select the component on the form, open the property page in the Object Inspector, select the property to be defined, and change it using the property editor (this can be a simple text or number field, a drop-down list, a drop-down list, a dialog box). panel, etc.).

1.3 Delphi

Delphi is a development environment that uses the Delphi programming language (starting from version 7, the language in the environment is called Delphi, previously Object Pascal), developed by Borland and initially implemented in its Borland Delphi package, from which it received its current name in 2003. Object Pascal is essentially a successor to the Pascal language with object-oriented extensions.

Delphi is a rapid development environment that uses Delphi as its programming language. The Delphi language is a strongly typed object-oriented language, which is based on Object Pascal, which is well known to programmers.

Delphi is a combination of several important technologies:

    high-performance compiler to machine code;

    – object-oriented model of components;

    – visual (and, therefore, high-speed) construction of applications from software prototypes;

    – scalable tools for building databases.

    Borland Delphi 8 Studio allows you to create a wide variety of programs: from the simplest single-window applications to programs for managing distributed databases. The package includes a variety of utilities that allow you to work with databases, XML documents, create a help system, and solve other problems. A distinctive feature of the seventh version is support for .NET technology.

    The main focus of the Delphi model is to maximize the productivity of the code. This allows you to develop applications very quickly, since pre-prepared objects already exist. You can also create your own objects, without any restrictions. The Delphi language is a strongly typed object-oriented language, which is based on Object Pascal, which is well known to programmers.

    Delphi comes standard with core objects from 270 base classes. This language is very convenient to write both database applications and even game programs. If we take into account the convenient interface for creating graphical shells, then we can confidently say that the Delphi language is a very easy to understand, but at the same time very powerful programming language.

    The first version of a full-fledged Delphi development environment for .NET was Delphi 8. It allowed you to write applications only for .NET. Currently, in Delphi 2006, you can write .NET applications using the standard .NET class library, VCL for .NET. The framework also allows you to create .NET applications in C# and Win32 applications in C++. Delphi 2006 contains features for writing common applications using the VCL and CLX libraries. Delphi 2006 supports MDA technology using ECO (Enterprise Core Objects) version 3.0.

    In March 2006, Borland decided to stop further improving the integrated development environments JBuilder, Delphi and C++ Builder due to the unprofitability of this area. In August 2006, Borland released a lightweight version of RAD Studio under the name Turbo: Turbo Delphi, Turbo Delphi for .NET, Turbo C#, Turbo C++. In March 2008, it was announced that development of this product line would be discontinued.

    In March 2007, CodeGear pleased users with the updated line of Delphi 2007 for Win32 products and the release of a completely new product, Delphi 2007 for PHP. In June 2007, CodeGear presented its plans for the future, that is, it published the so-called roadmap, which can be found here

    On August 25, 2008, Embarcadero, the new owner of CodeGear, published a press release on Delphi for Win32 2009. The version brought many innovations to the language, such as:

    – full support for Unicode by default in all parts of the language, VCL and RTL;

    – generalized types, also known as generics.

    – anonymous methods.

    Among the many common software products made in Delphi you can find:

    1. Borland products: Borland Delphi, Borland C++ Builder, Borland JBuilder versions 1 and 2.

    2.Database administration/development: MySQL Tools (Administrator, Query Browser), IBExpert, TOAD

    3.Engineering software: Altium Designer/Protel (electronics design).

    4.Graphics viewers: FastStone Image Viewer, FuturixImager, Photofiltre.

    5.Video and audio players: KMPlayer (video and audio player), X-Player (audio player).

    6.Delivery of information on the Internet: Skype (VoIP and IM), QIP, QIP Infium and R&Q, (IMs), The Bat! and si.Mail (email clients), PopTray (mail checker), FeedDemon (RSS/Atom newsgroup viewer), XanaNews (newsgroup reader), Xnews (newsgroup reader).

    7.Music creation: FL Studio (formerly FruityLoops).

    8.Software development: Dev-C++, Dev-PHP, Maguma Open Studio and Open Perl IDE (IDE), DUnit (unit testing), Jedi Code Format (code formatting), Game Maker (game creation) Help & Manual (help authoring system), Inno Setup (installation engine).

    9.Web development: Macromedia HomeSite (HTML editor), TopStyle Pro (CSS editor), Macromedia Captivate (screen capture), Quick Page 2008 (Web site development environment).

    10.Web browsers (shells for MSIE): Avant Browser, Netcaptor.

    11.Utilities: Spybot - Search & Destroy, Ad-Aware (anti-spyware), jv16 PowerTools, FDK (multifunctional system optimization utility), Total Commander and Frigate (file managers), DarkCrypt TC/GUI (encryption software package), ImageSpyer and StegoTC (steganographic software package), Copernic Desktop Search, PowerArchiver and PeaZip (archivers), MCubix (data mining), Download Master [download manager], ACProtect (program for packaging and protecting EXE files).

    12.Text editors: SynEdit, Bred2, KeyNote, cEdit Professional, Programmer’s Notepad, UniRed, gleditor.

    13.Binary file editors (HEX editors): Hexapad

    14.Accounting and Taxation: Intuit's Lacerte Professional Tax Software, including all subsystems such as QuickBooks/EasyACCT Trial Balance Utility, Document Management System and Client Database Repair Utility.

    15.Programs for reading and cataloging electronic text: DarkLib (cataloguer and multi-format e-reader), IxReader (e-reader).

    2 Comparative analysis of the capabilities (advantages) disadvantages of modern object-oriented languages ​​and development tools based on them

    2.1 Object Pascal

    Object Pascal is a fully object-oriented dialect of the Pascal language, developed by Apple Computer together with Niklaus Wirth. In 1986, Borland added a similar Pascal extension to the Turbo Pascal for Macintosh product; with the release of Turbo Pascal 5.5, the extension became available for DOS. Starting with Delphi 7, Borland began officially calling its language Delphi. However, Object Pascal is maintained and developed by other developers. The most serious implementations of Object Pascal (besides Delphi) are TMT Pascal, Virtual Pascal and Free Pascal.

    Any Delphi program consists of a project file (file with the dpr extension) and one or more modules (files with the pas extension). Each of these files describes an Object Pascal program unit.

    In the code window, so-called reserved words are highlighted in bold, and comments are in italics (reserved words and comments in the book are also highlighted). As you can see, the program text begins with the reserved word program and ends with the word end followed by a dot. Note that the combination of end with the dot following it is called a program unit terminator: as soon as such a terminator is encountered in the program text, the compiler stops analyzing the program and ignores the rest of the text.

    Reserved words play an important role in Object Pascal, giving the entire program the appearance of text written in almost natural English. Each reserved word (and there are several dozen of them in Object Pascal) carries a conditional message for the compiler, which analyzes the program text in the same way we read it: from left to right and from top to bottom.

    Comments, on the contrary, mean nothing to the compiler, and it ignores them. Comments are important for the programmer, who uses them to explain certain parts of the program. The presence of comments in the text of the program makes it clearer and makes it easy to remember the implementation features of a program that was written several years ago. In Object Pascal, a comment is any sequence of characters enclosed in curly braces. In the above text there are two such comments, but the line

    ($R *.RES)

    is not really a comment. This specially written piece of code is called a compiler directive (in our case, it is an instruction to the compiler to connect a so-called resource file to the program). Directives begin with a $ symbol, which is immediately followed by an opening curly brace.

    Since we are talking about comments, I note that in Object Pascal pairs of characters (*, *) and // can also be used as comment delimiters. Brackets (*...*) are used like curly braces, i.e. a fragment of text contained in them is considered a comment, and the // symbols indicate to the compiler that the comment is located behind them and continues until the end of the current line:

    (This is a comment)

    (*This is also a comment*)

    //All characters up to the end of this line constitute a comment

    The word Program followed by the program name and a semicolon forms the program title. Following the header is a description section in which the programmer (or Delphi) describes the identifiers used in the program. Identifiers denote program elements, such as types, variables, procedures, functions (we'll talk about program elements a little later). Here, using a sentence that begins with the reserved word uses, the programmer informs the compiler about those program fragments (modules) that must be considered as integral parts of the program and which are located in other files. Strings

    uses

    Forms, Unit1 in 'Unitl.pas' (fmExample);

    indicate that in addition to the project file, the program must use the Forms AND Unit1 modules. the Forms module is standard (i.e. already known to Delphi), and the Unit1 module is new, previously unknown, and Delphi in this case also specifies the name of the file with the text of the module (in 'uniti.pas') and the name of the description file associated with the module forms(fmExample).

    The actual body of the program begins with the word begin and is limited by the terminator end with a dot. The body consists of several Object Pascal language statements. Each statement implements some action - changing the value of a variable, analyzing the result of a calculation, calling a subroutine, etc. The body of our program contains three executable statements:

    Application.Initialize;

    Application.CreateForm(TfmExample, fmExample);

    Application.Run;

    Each of them implements a call to one of the methods of the Application object

    An object is a specially designed fragment of a program that contains data and subroutines for processing it. The data is called the fields of an object, and the routines are called its methods. The object as a whole is intended to solve a specific problem and is perceived in the program as an indivisible whole (in other words, it is impossible to “pull out” a separate field or method from the object). Objects play an extremely important role in modern programming languages. They were invented in order to increase the productivity of the programmer and at the same time improve the quality of the programs he develops. Two main properties of an object - functionality and indivisibility - make it an independent or even self-sufficient part of the program and make it easy to transfer the object from one program to another. Delphi developers have come up with hundreds of objects for you and me that can be considered as bricks from which a programmer builds a multi-story program building. This principle of constructing programs is called object-oriented programming (OOP). The Application object contains data and routines necessary for the normal functioning of the Windows program as a whole. Delphi automatically creates an Application program object for each new project. Line

    Application.Initialize;

    means calling the Initialize method of the Application object. After reading this line, the compiler will create code that will force the processor to start executing some fragment of the program that the Delphi developers wrote for us. After this fragment is executed (programmers say: after exiting the subroutine), processor control will move to the next line of the program, which calls the CreateForm method, etc.

    Modules are program units designed to house program fragments. With the help of the program code contained in them, the entire behavioral side of the program is implemented. Any module has the following structure: header interface declaration section implementation section terminator The header opens with the reserved word Unit followed by the module name and a semicolon. The interface declaration section opens with the reserved word Interface, and the implementation section with the word implementation. The terminator of a module, like the terminator of a program, is end with a dot. The following program fragment is a syntactically correct version of the module:

    unit Unit1;

    interface

    // Section of interface declarations

    implementation

    // Implementation section

    end.

    The interface declarations section describes the program elements (types, classes, procedures and functions) that will be ‘visible’ to other program modules, and the implementation section reveals how these elements work. Dividing the module into two sections provides a convenient mechanism for exchanging algorithms between separate parts of the same program. It also implements a means of sharing software developments between individual programmers. Having received a compiled “foreign” module, the programmer gains access only to its interface part, which, as already mentioned, contains element declarations. Details of the implementation of declared procedures, functions, classes are hidden in the implementation section and are not available to other modules.

    Classes serve as the main tool for implementing the powerful features of Delphi. A class is a model from which objects are created, and conversely, an object is an instance of an implementation of a class. The patterns for creating program elements in Object Pascal are called types, so the TfmExamplel class is a type. Its declaration is preceded by the reserved word type, which notifies the compiler that a type declaration section has begun.

    The standard TForm class implements everything needed to create and operate an empty Windows window. The class TfmExamplel is derived from this class, as evidenced by the line

    TfmExample = class(TForm)

    in which the name of the parent class is indicated in parentheses after the reserved word class. The term "derived" means that the TfmExample class has inherited all the capabilities of the parent TForm class and added its own to them in the form of additional components that are inserted into the fmExample form. The list of components we inserted makes up a significant part of the class description.

    The property of inheritance by descendant classes of all properties of the parent class and enriching them with new capabilities is one of the fundamental principles of object-oriented programming. A new heir can be generated from the heir, which will contribute in the form of additional software components, etc. As a result, a branching hierarchy of classes is created, at the top of which is the simplest class TObject (all other classes in Delphi are derived from this single progenitor), and at the very bottom level of the hierarchy there are powerful descendant classes that are capable of solving any problem.

    The fmExampie object formally refers to program elements called variables. This is why the object declaration is preceded by the reserved word var (from the English variables).

    Program elements are its minimal indivisible parts that still carry a certain significance for the compiler. Elements include:

    reserved words;

    identifiers;

    types;

    constants;

    variables;

    tags;

    subroutines;

    comments.

    Reserved words are English words that tell the compiler to perform certain actions. Reserved words cannot be used in a program for any purpose other than that for which they are intended. For example, the reserved word begin indicates to the compiler the beginning of a compound statement. A programmer cannot create in a program a variable named begin, a constant begin, a begin label, or any other program element named begin.

    Identifiers are words that a programmer uses to designate any element of a program other than a reserved word, identifier, or comment. Identifiers in Object Pascal can consist of Latin letters, Arabic numerals and underscores. No other characters or special characters may appear in the identifier. From this simple rule it follows that identifiers cannot consist of several words (you cannot use a space) or include Cyrillic (Russian alphabet) characters.

    Types are special language constructs that are treated by the compiler as templates for creating other program elements, such as variables, constants, and functions. Any type defines two important things for the compiler: the amount of memory allocated to accommodate an element (constant, variable, or the result returned by a function), and the set of valid actions that a programmer can perform on elements of this type. I note that any programmer-defined identifier must be described in the descriptions section (before the start of executable statements). This means that the compiler must know the type (pattern) from which the element specified by the identifier is created.

    Constants define areas of memory that cannot change their values ​​during program execution. Like any other program elements, constants can have their own names. The declaration of constant names must be preceded by the reserved word const (from the English constants - constants). For example, we can define const constants

    Kbyte = 1024;

    Mbyte = Kbyte*Kbyte;

    Gbyte = 1024*Mbyte;

    so that instead of long numbers

    1048576 (1024*1024) and 1073741824

    (1024*1024*1024) write, respectively, Mbyte and Gbyte. The type of a constant is determined by the way it is written and is easily recognized by the compiler in the program text, so the programmer may not use named constants (that is, not declare them explicitly in the program).

    Variables are associated with mutable areas of memory, that is, with such areas of memory, the contents of which will change during the operation of the program. Unlike constants, variables are always declared in the program. To do this, after the variable identifier, place a colon and the name of the type in the image of which the variable should be constructed. The variable(s) declaration section must be preceded by the word var. For example:

    var

    inValue: Integer;

    byValue: Byte;

    Here the identifier inValue is declared as an integer variable, and the byValue identifier is declared as a Byte variable. The standard (i.e., predefined in Object Pascal) type integer defines a four-byte region of memory whose contents are treated as an integer in the range -2,147,483,648 to +2,147,483,647, and the standard type Byte defines a memory region of 1 byte in length , which holds an unsigned integer in the range 0 to 255 4 . All information given regarding the range of possible values ​​and memory capacity of standard types applies to Delphi 32. For 16-bit version 1, these values ​​​​have different meanings, for example, the Integer type in version 1 takes 2 bows and has a value range from -32,768 to +32 767.

    Labels are the names of program statements. Labels are used very rarely and only so that the programmer can indicate to the compiler which program statement should be executed next. Labels, like variables, are always declared in a program. The label declaration section is preceded by the reserved word label.

    Subroutines are specially designed fragments of a program. A remarkable feature of subroutines is their significant independence from the rest of the program text. The properties of a subroutine are said to be localized in its body. This means that if the programmer changes something in the subroutine, he usually does not need to change anything outside the subroutine because of it. Thus, subroutines are a means of structuring programs, that is, dividing programs into a number of largely independent fragments. Structuring is inevitable for large software projects, so subroutines are used very often in Delphi programs.

    There are two kinds of routines in Object Pascal: procedures and functions. A function differs from a procedure only in that its identifier can be used in expressions along with constants and variables, since the function has an output result of a certain type. If, for example, a function is defined

    Function MyFunction: Integer;

    and variable var

    X: Integer;

    then the following assignment operator is possible:

    X:= 2*MyFunction-l;

    The name of a procedure cannot be used in an expression because the procedure has no result associated with it:

    Procedure MyProcedure;

    :

    X:= 2*MyProcedure-l; // Error!

    2.2 C++

    C++, an extension of the C language, was developed by Bjarne Stroustrop, an employee of the AT&T Bell Laboratories research center (New Jersey, USA), in 1979. C++ contains everything that is in C. But, in addition, it supports object-oriented programming (Object Oriented Programming, OOP). C++ was originally created to make it easier to develop large programs. Object-oriented programming is a new approach to creating programs.

    Except for minor details, C++ is a superset of the C programming language. In addition to the capabilities that C provides, C++ provides a flexible and efficient means of defining new types. By using new type definitions that closely match the concepts of the application, the programmer can divide the program being developed into easily manageable parts. This method of building programs is often called data abstraction. Type information is contained in some user-defined type objects. Such objects are simple and reliable to use in situations where their type cannot be determined at compile time. Programming using such objects is often called object-oriented. When used correctly, this method produces programs that are shorter, easier to understand, and easier to control.

    The key concept in C++ is the class. A class is a user-defined type. Classes provide data hiding, guaranteed data initialization, implicit type conversion for user-defined types, dynamic type setting, user-controlled memory management, and operator overloading mechanisms. C++ provides much better means of expressing program modularity and type checking than C does. The language also has improvements not directly related to classes, including symbolic constants, inline function substitution, default function parameters, overloaded function names, free memory management operations, and reference type. C++ retains the capabilities of the C language for working with basic hardware objects (bits, bytes, words, addresses, etc.). This allows you to implement user-defined types very efficiently.

    C++ and its standard libraries are designed to be portable. The current implementation of the language will run on most systems that support C. C++ programs can use C libraries, and most of the tools that support C programming can be used with C++

    A C++ program typically consists of a large number of source files, each containing declarations of types, functions, variables, and constants. In order for a name to be used in different source files to refer to the same object, it must be declared as external. For example:

    extern double sqrt(double);

    extern instream cin;

    The most common way to ensure consistency between source files is to place such declarations in separate files called header (or header) files, and then include, that is, copy, these header files in all files where these declarations are needed. For example, if the description of sqrt is stored in the header file for the standard math functions math.h, and you want to extract the square root of 4, you could write:

    #include

    //…

    x = sqrt(4);

    Because regular header files are included in many source files, they do not contain descriptions that should not be repeated. For example, function bodies are given only for inline-inline functions (see this paragraph) and initializers are given only for constants (see this paragraph). Except in these cases, the header file is the repository of type information. It provides an interface between separately compiled parts of a program.

    In an include command, the file name enclosed in angle brackets, for example, refers to a file of that name in the standard directory (often /usr/include/CC); files located in other locations are referenced using names enclosed in double quotes.

    For example:

    #include "math1.h"

    #include "/usr/bs/math2.h"

    will include math1.h from the current user directory and math2.h from the /usr/bs directory.

    Here is a very small complete example of a program in which a string is defined in one file and printed in another. The header.h file defines the required types:

    // header.h

    extern char* prog_name;

    extern void f();

    The file main.c contains the main program:

    // main.c

    #include "header.h"

    char* prog_name = "good, but complete";

    main()

    {

    f();

    }

    and the f.c file prints the line:

    //f.c

    #include

    #include "header.h"

    void f()

    {

    cout<< prog_name << «\n»;

    }

    For example, you can compile and run the program like this:

    $ CC main.c f.c -o silly

    $silly

    good but complete

    $

    A language that supports data localization, data abstraction and object-oriented programming technologies, in order to be a general-purpose language, must also:

    Be implemented on traditional computers;

    Run in the environment of traditional operating systems;

    Be competitive with traditional programming languages ​​in terms of efficiency when executing programs;

    Suitable for most possible applications.

    This means that facilities for efficient numerical applications must be included (floating arithmetic without overhead, otherwise Fortran will be more attractive). Memory access capabilities must be enabled (which is necessary for writing drivers). There must be opportunities to access functions (call calls) consistent with the interfaces of specific operating systems. And, additionally, it should be possible to access functions written in other languages ​​and vice versa, to functions written in object-oriented languages ​​from other languages.

    Table 1 shows the advantages and disadvantages of object-oriented languages.

    Table 1 - Advantages and disadvantages of object-oriented languages

    pros

    Minuses

    Classes allow you to construct useful components with simple tools, which makes it possible to abstract from implementation details

    Must understand basic concepts such as classes, inheritance, and dynamic binding

    Data and operations together form a specific entity and they are not “smeared” throughout the program, as is often the case with procedural programming

    Reusability requires the programmer to become familiar with large class libraries

    Code and data localization improves software visibility and maintainability

    Designing classes is a much more difficult task than using them

    Information encapsulation protects the most critical data from unauthorized access.

    It is very difficult to study classes without being able to “touch” them.

    Allows you to create expandable systems

    Inefficiency in terms of memory allocation

    Object-oriented technology provides users with improved performance throughout the software lifecycle, resulting in a real return on investment. Increased performance is achieved when there are four main properties of object-oriented systems and the resulting benefits:

    the use of objects as basic models allows the user to simulate complex real-world systems;

    the flexibility of object-oriented texts results in a quick response to changes in user requirements;

    reusing standard components reduces both the development time for new application tasks and the volume of generated code;

    the simplicity of the software makes it more flexible and reduces operating costs.

    Along with these obvious advantages, the use of object-oriented languages ​​and programming environments facilitates incremental software development. Rapid prototyping of interfaces allows you to test user responses regardless of the main body of the application task. The value of this approach is most evident in projects whose application tasks are unclear or difficult to understand.

    Currently, there are few objective measures of productivity growth due to the fact that most projects related to object-oriented systems are in their early stages. One of the companies, STC Technology (UK), which made comparative estimates, calculated that the development stage of an object-oriented project takes half the time than a similar task in a traditional system and requires a quarter of the man-hours.

    The first major advantage of object-oriented systems comes from the nature of their connection to the real world. A developer can design a physical system into a software system by initially defining all the important physical objects and their corresponding software objects. Groups of related physical objects are mapped into classes, which can be organized into a hierarchy, starting with general classes and adding specialized subclasses to them. Procedures common to several classes are in their common superclass and are inherited by them.

    For example, in a measurement system developed at Combuston Engineering (Columbus, Ohio), a group of sensors is represented by a Sensor class that defines the common properties of all sensors. Subclasses are defined for each sensor type in the system, such as optical or infrared. They inherit the general procedures that apply to all sensors and contain additional procedures that apply only to optical or infrared sensors.

    The object-oriented approach reduces the conceptual gap between the real world and the computer model. It allows analysts and designers to clearly understand the structure of the system. As one user notes: “I can represent my thoughts with program text in the form I think.” Therefore, today object-oriented systems are used to model complex physical systems in manufacturing, telecommunications, and military and defense applications.

    The second advantage of object-oriented systems comes from the way objects are interconnected through messages. In the example above, general messages like “start measurement” could be sent to all sensors in the system; each of them responds in a specific way. If one of the physical sensors is out of date, it is replaced. At the same time, the corresponding class of the system changes: for a new type of sensor, a new class is introduced, containing procedures specific to the new sensor. The new class inherits the remaining procedures it needs from the superclass. When the new sensor receives a general message, it responds accordingly. The body of the entire system and general messages remain unchanged.

    The flexibility of object-oriented systems is a distinct advantage for users in rapidly changing environments such as programming technology. For example, Computer Science Corporation used the object-oriented language Smalltalk to develop its Design Generator product. The company notes that thanks to the use of object-oriented technology, program developers are able to quickly respond to new market trends in an increasingly competitive environment.

    The third advantage of object-oriented systems is that classes can inherit procedures from other classes. A company can compile libraries of the most commonly used classes, containing procedures designed for specific needs and used in subsequent application tasks. For example, a software development company might create a class library for graphics primitives such as a cylinder, cone, or sphere. These form the basis for subclasses such as conic section or section. Reusing source code reduces development time and allows designers to confidently solve problems in a variety of areas.

    In the past, routine libraries were used by software developers to solve standard problems such as mathematical calculations. Object-oriented systems allow for a wider range of reuse of program texts. One of the first users, Cadre Technologies, calculated that the volume of code for a new application task is reduced by a ratio of 5:1 when using object-oriented programs.

    Object libraries can also be purchased from independent vendors. Currently, such class libraries are most actively purchased for creating user interfaces with icons. Designing and writing such interfaces from scratch is not an easy task. Companies like Apple and the Whitewater Group provide tools for quickly building such interfaces based on a few base classes like Window, Menu, ScrollBar and Icon. Users can use both these classes and their subclasses that add, for example, special icons to the interface.

    The fourth advantage lies in the way object-oriented software modules are packaged. Traditional software consists of data and procedures that access and change data. Data and procedures are packaged separately, so changing the data structure affects different modules written by different users. In an object-oriented system, data and procedures are considered together as part of a single package—an object. When data changes, all procedures involved are easily identified and changed simultaneously. Because the change affects only one area of ​​the system, its spillover effect on the entire system is reduced.

    It is known that maintenance costs account for up to 80% of the life cycle cost of a programming system. Developers of large complex systems, often faced with the need to modify them, are inclined to use OOS as one of the ways to reduce maintenance costs and increase the reliability of their products. For example, Wild Leitz (Toronto, Canada) used the object-oriented language Objective-C to develop a geographic information system. The company found source code in this language easier to maintain because it is shorter, self-contained, and reduces the impact of changing one module on the rest of the system.

    Properly designed programs must not only satisfy their functional requirements, but also have properties such as:

    reusability;

    extensibility;

    resistance to incorrect data;

    systematicity.

    A proper object-oriented programming style ensures that these properties are present. Let us explain this using the example of the property of systematicity.

    A program has the property of being systematic if it is applicable as a generalized operator in “large-block programming”. Large-block programming is the systematic use of previously developed large software units (such as classes, subsystems, or modules) in the development of new software systems.

    The limitations of modern object-oriented systems (OOS) are mostly related to their imperfections. Overcoming these limitations is a challenge for software vendors and an opportunity for new vendors to enter the market. This chapter discusses the challenges of developing object-oriented systems and provides a timeline for overcoming their weaknesses.

    The main obstacle to object-oriented systems today is resistance from technical and management personnel. This resistance is natural given the imperfect nature of many object-oriented products on the market today. Imperfection is demonstrated by a number of problems inherent in most new technologies:

    limited access on a number of standard platforms;

    the need for integration with existing systems and databases;

    lack of software for programming large-scale systems.

    The success of object-oriented technology is due to its penetration into the mainstream of the computer industry. For this to happen, the above-mentioned problems must be dealt with. But this is quite an expensive and time-consuming activity. Some of the early suppliers of object-oriented systems added to their problems by choosing non-standard proprietary languages ​​as the basis for their products. Having received large capital investments, such companies will face great problems in the struggle to occupy their niche in the market.

    An object-oriented language cannot rely entirely on mechanisms that are not effectively implemented on traditional architectures, and such a language is still intended to be used as a general-purpose language. The same can be said for garbage collection, which can be a performance and portability bottleneck. Most object-oriented languages ​​use garbage collection to simplify the programmer's problems and reduce the complexity of the language itself and the compiler. However, it should be possible to use garbage collection in non-critical situations, but retain memory control where necessary. An alternative is a language that is not garbage collected but allows you to design types that manage the memory they use. An example would be C++.

    Exception handling and specific resource usage also pose challenges. Any language feature that is implemented using a link editor will likely also present a portability issue.

    An alternative to including low-level features in a language is to use specialized low-level languages ​​in critical cases.

    Object-oriented programming is programming that uses the inheritance mechanism. Data abstraction is programming using user-defined types. With few exceptions, object-oriented programming can and should be a generalization of data abstraction.

    This mechanic needs proper language support to be effective. For data abstraction, only language support is sufficient; object-oriented programming requires tools from a system-wide software environment. To have the properties of a general-purpose language, the language must allow efficient use of traditional hardware.


    Rice. 3. Simplified diagram of the organization of a multi-module system for working with geometric objects

    The multimodular structure of the system has the following advantages.

    Extensibility. Adding new classes and their interactions is done not by rewriting existing code, but by developing new modules.

    Possibility of code reuse. The Geometric Objects module can be included in any application, if it also has Demo Windows, you can also include Visualization.

    Possibility of stage-by-stage implementation of programs. So, the first release may include Geometric Objects, Demo Windows and Visualization, the second will add Calculations, etc.

    Possibility of using the conveyor production method, “parallelizing” the software development process.

    There are several reasons why C++ cannot be considered a dynamic programming language.

    Static interface and class implementation. The interface of a class is understood as the set of its attributes and methods (set by the description of the class, usually placed in the header file), while the implementation is the specific code executed when these methods are called. Both the first and the second must be defined before compilation begins; you cannot run-time add a variable or method to a class or override an existing one.

    But when developing new modules, there is constantly a need to change existing classes! So, when developing Calculations, you may need functions that calculate the length of a line, its curvature at a certain point, or the area of ​​a figure. When developing a Visualization, there may be a need for variables such as color, line thickness; for flat figures, a triangulation (partition into triangles) must often be constructed. Moreover, the above functions significantly depend on the type of object: they must be written separately for rectangles, circles and arbitrary geometric objects.

    Static type checking.

    When parsing the expression p->f(), the compiler "must be sure" that the object pointed to by pointer p actually contains a method f(). Even templates do not always help create code that processes different types of objects: at the compilation and assembly stage, you need to know which of them need to be installed, which one is used in each specific case. Try the task in Listing 1 without changing classes or using if-then-else + dynamic_cast constructs.

    /*

    Listing 1. Static type checking limits the use of polymorphism

    */

    class baseclass();

    class A:public baseclass

    {

    public:

    A();

    // class A contains the void f() method

    virtual void f();

    };

    class B:public baseclass

    {

    public:

    B();

    // class B does not contain a void f() method

    };

    class C:public baseclass (...);

    /*

    Required to write

    (without changing the above classes and without using if-then-else + dynamic_cast):

    */

    bool CallF(baseclass *p)

    {

    /*

    if p->f() is defined, call this function and return true,

    otherwise return false

    */

    }

    C++ offers three ways to implement the CallF function. The first (most used) is to add the bool f() method to the baseclass, in those subclasses where it makes sense - perform the necessary actions and return true, in the rest - return false. The second is to create a class baseclass_f:public baseclass, inherit from it all classes containing f(), and use dynamic_cast< baseclass_f *>. The third is the notorious if-then-else + dynamic_cast in CallF. The first option leads to clogging of the base class, and the baseclass may not be accessible (for example, contained in a “closed” module). The second requires redesigning the entire system of objects. What if you then need to write CallG, CallH? Of course, C++ supports multiple inheritance, but the class hierarchy with this approach will become much more complicated, and there’s no point in changing it “back and forth.” The disadvantages of the third method have been discussed many times: the CallF function will have to be rewritten whenever a new class is introduced that supports f().

    Inability to change individual class objects at run-time. It would seem that if objects belong to the same class, then they should behave the same. If you are not satisfied with an existing class in any way, “inherit” it and change whatever you want. However, the ability to dynamically change individual objects of a class is often very useful. Of course, inheritance is a flexible and convenient way to change the functionality of classes. But after an object is created, it is no longer possible to change its methods or add new methods and variables. To do this, you need to delete the existing object and then create a new one. In this case, you need to take care of updating all pointers to this object and saving its properties. In addition, if new classes are created each time, their number may exceed all reasonable limits.

    Conclusion

    The most common object-oriented programming language is by far C++. Freely available commercial C++ programming systems exist on virtually every platform. The freely distributed G++ programming system is widely known, which gives everyone the opportunity to parse the fairly well and thoroughly commented source code of one of the exemplary C++ language compilers. The main ideas of the object-oriented approach are based on the following provisions: a program is a model of some real process, part of the real world; a model of the real world or part of it can be described as a set of objects interacting with each other; an object is described by a set of parameters, the values ​​of which determine the state of the object, and a set of operations (actions) that the object can perform; interaction between objects is carried out by sending special messages from one object to another. A message received by an object may require certain actions to be taken, such as changing the state of the object; Objects described by the same set of parameters and capable of performing the same set of actions constitute a class of objects of the same type.

    From a programming language perspective, a class of objects can be thought of as a type of a datum, and an individual object can be thought of as a datum of that type. The definition by the programmer of his own object classes for a specific set of tasks should allow him to describe individual tasks in terms of the task class itself (with an appropriate choice of type names and object names, their parameters and performed actions).

    Thus, the object-oriented approach assumes that when developing a program, the classes of objects used in the program must be determined and their descriptions must be constructed, then instances of the necessary objects must be created and the interaction between them must be defined.

    It is often convenient to structure object classes so that they form a hierarchical structure.

    Obviously, in order to productively use the object approach for program development, programming languages ​​are needed that support this approach, i.e. allowing you to build a description of object classes, generate data of object types, and perform operations on objects. One of the first such languages ​​was the SmallTalk language, in which all data are objects of certain classes, and the overall class system is built as a hierarchical structure based on predefined base classes.

    Programming experience shows that any methodological approach in programming technology should not be applied blindly, ignoring other approaches. This also applies to the object-oriented approach. There are a number of typical problems for which its usefulness is most obvious; such problems include, in particular, simulation modeling tasks and programming dialogues with the user. There are also problems in which the use of the object approach will lead to nothing but unnecessary labor costs. In this regard, object-oriented programming languages, which allow combining the object approach with other methodologies, have become most widespread. In some languages ​​and programming systems, the use of the object approach is limited to user interface tools (for example, early versions of Visual FoxPro).

    List of used literature

  1. Arkhangelsky A. Programming in Delphi for Windows. Versions 2006, 2007, Turbo Delphi + CD. –M.: Binom. Knowledge Laboratory, 2006.

    Arkhangelsky A. C++ language in C++Builder. Reference and methodological manual. – M.: Binom. Knowledge Laboratory, 2008.

    Bucknell J. Fundamental algorithms and data structures in Delphi. Programmer's Library. – St. Petersburg: Peter, DiaSof, 2006.

    Galiseev G.V. Components in Delphi 7. Professional work. – M.: Williams, 2006.

  2. Gamma E. Techniques of object-oriented design. Design patterns. St. Petersburg: Peter, 2006.
    Solve the problem based on the text of the Laws of Hammurabi Improving the accounting of fixed assets of an agricultural enterprise What is the time frame for conducting an inventory of fixed assets?

    2014-05-28


Did you like the article? Share it