History of the C language. §1 General information about the language. Stages of program design. Application life cycle models History of the C programming language
C language and UNIX
Programming language WITH(read "C") was created in the early 70s, when Ken Thompson and Dennis Ritchie from Bell Labs developed the UNDC operating system. First they created the compiler part WITH, then used it to compile the rest of the compiler WITH and finally used the resulting compiler to compile UNIX. The UNIX operating system was originally distributed in source code to WITH among universities and laboratories, and the recipient could compile source code in the language WITH into machine code using a suitable compiler WITH.
The distribution of source code made the UNIX operating system unique; the programmer could change the operating system, and the source code could be transferred from one hardware platform to another. Today the POSIX standard defines a standard set system calls UNIX available in WITH, which must be implemented in versions of UNIX that are POSIX-compliant. C was the third language that Thomson and Ritchie developed during the creation of UNIX; the first two were, of course, A And IN.
C mobile assembly language
Compared to earlier language - BCPL, language WITH has been improved by adding data types of specific lengths. For example, the int data type could be used to create a variable with a specific number of bits (typically 16), while the long data type could be used to create an entire variable with a large number bits (usually 32). Unlike other languages high level, WITH could work with memory addresses directly using pointers and references. Since WITH retained the ability to directly access hardware, it is often classified as a mid-level language or jokingly called a “mobile assembly language.”
C - structured programming language
As for grammar and syntax, then WITH is a structured programming language. While many modern programmers think in terms of classes and objects, programmers WITH think in terms of procedures and functions. IN WITH You can define your own abstract data types using the struct keyword. Similarly, you can describe your own integer types (enumerations) and give other names to existing data types using keyword typedef In this sense WITH is a structured language with the germs of object-oriented programming.
Standardization of the C language
Widespread language C on various types computers (sometimes called hardware platforms) have unfortunately led to many variations of the language. They were similar, but incompatible with each other. This was a major problem for software developers who needed to write compatible programs that could run on multiple platforms. It became clear that a standard version was needed C. In 1983 ANSI (American National Standards Committee) formed technical committee X3J11 to create a language standard C(to "provide an unambiguous and machine-independent definition of the language"). In 1989 the standard was approved. ANSI has partnered with ISO (International Standards Organization) to standardize C internationally; a joint standard was published in 1990 and named ANSI/ISO 9899:1990. This standard is still being improved and is supported by most compiler development companies.
Birth of C++
Bjarne Stroustrup unleashes object-oriented potential WITH by transferring class capabilities Simula 67 V WITH. Initially, the new language bore the name "C with classes" and only then began to be called C++. Language C++ achieved popularity after being developed at Bell Labs, it was later transferred to other industries and corporations. Today it is one of the most popular (and authoritative) programming languages in the world. C++ inherits both good and bad sides WITH.
Revelations of Bjarna Stroustrup
Bjarne Stroustrup: "I came up with C++, wrote down its initial definition and completed the first implementation. I selected and formulated design criteria C++, developed its main features and was responsible for the fate of proposals for expanding the language in the standardization committee C++", writes the author of the most popular programming language. - "The language C++ owes a lot to language C, and language C remains a subset C++ language(but C++ has fixed several serious flaws in the C type system). I also saved funds C, which are low-level enough to handle the most critical system tasks. Language C, in turn, owes a lot to its predecessor, BCPL; By the way, the comment style // was taken from C++ from BCPL. Another main source of inspiration was language Simula67. The concept of classes (with derived classes and virtual functions) was borrowed from it. A means of overloading operators and the ability to place announcements anywhere where an instruction can be written reminds Algol68. "
Why C++
Name C++ invented by Rick Massitti. The name indicates the evolutionary nature of the transition to it from C. "++" is an increment operation in C. Slightly shorter name C+ is a syntax error; in addition, it has already been used as the name of a completely different language. Semantics experts C find that C++ worse than ++C. Titles D the language didn't get it because it's an extension of C and doesn't try to cure its problems by throwing out various features.
Why was C++ needed?
Initially C++ programming language was designed so that the author and his friends do not have to program in assembly, C, or other modern high-level languages. Its main purpose was to write good programs simpler and more enjoyable for the individual programmer. Development Plan C++ never existed on paper; design, documentation and implementation moved simultaneously. Of course, the external interface C++ was written in C++. There has never been a "C++ Project" or a "C++ Development Committee". That's why C++ has evolved and continues to evolve in all directions to cope with the challenges faced by users and through discussions between the author and his friends and colleagues.
True object-oriented C++
IN C++ language The principles of object-oriented programming are fully supported, including the three pillars on which it stands: encapsulation, inheritance and polymorphism. Encapsulation in C++ supported through the creation of non-standard (custom) data types called classes. Language C++ supports inheritance. This means that you can declare new type data (class), which is an extension of an existing one.
Although C++ programming language rightly called a continuation WITH and any workable program in the language WITH will be supported by the compiler C++, when moving from WITH To C++ a very significant leap has been made. Language C++ benefited from its affinity with language WITH for many years, as many programmers have found that in order to take full advantage of C++ language, they need to abandon some of their previous knowledge and acquire new ones, namely: study new way conceptualization and programming problem solving. Before you start learning C++, Stroustrup and most other programmers using C++ consider language learning WITH optional.
Programming language C++ is currently considered the dominant language used for developing commercial products, 90% of games are written in C++ using DirectX.
Literature
Sources:
- H.M.Deitel, P.J.Deitel "How to Program in C++"
- Bjarne Stroustrup "The C++ Programming Language. 3rd Edition."
- Simon Robinson, Ollie Cornes, Jay Glynn and others. "C# for professionals"
- Jess Liberty "Teach yourself C++ in 21 days"
- Stanislav Gornakov "DirectX, programming lessons in C++"
C++ programming language
Last update: 08/28/2017
The C++ programming language is a high-level compiled programming language general purpose statically typed, which is suitable for creating a wide variety of applications. Today, C++ is one of the most popular and widespread languages.
It has its roots in the C language, which was developed in 1969-1973 at Bell Labs by programmer Dennis Ritchie. In the early 1980s, Danish programmer Bjarne Stroustrup, then working at Bell Labs, developed C++ as an extension to the C language. In fact, in the beginning, C++ simply supplemented the C language with some object-oriented programming capabilities. And that’s why Stroustrup himself initially called it “C with classes.”
Subsequently, the new language began to gain popularity. New features were added to it that made it not just an addition to C, but a completely new programming language. As a result, “C with classes” was renamed to C++. And from then on, both languages began to develop independently of each other.
C++ is a powerful language, inheriting rich memory capabilities from C. Therefore, C++ often finds its use in system programming, in particular, when creating operating systems, drivers, various utilities, antiviruses, etc. By the way, Windows OS is mostly written in C++. But only system programming application of this language not limited. C++ can be used in programs of any level where speed and performance are important. It is often used to create graphical applications, various application programs. It is also especially often used to create games with rich, rich visualization. In addition, in lately The mobile direction is gaining momentum, where C++ has also found its application. And even in web development, you can also use C++ to create web applications or some supporting services that serve web applications. In general, C++ is a widely used language in which you can create almost any type of program.
C++ is a compiled language, which means that the compiler translates C++ source code into an executable file that contains a set of machine instructions. But different platforms have their own characteristics, so compiled programs cannot simply be transferred from one platform to another and run there. However, at the source code level, C++ programs are largely portable unless some OS-specific functions are used. And the availability of compilers, libraries and development tools for almost all common platforms allows you to compile the same C++ source code into applications for these platforms.
Unlike C, the C++ language allows you to write applications in an object-oriented style, representing a program as a collection of classes and objects interacting with each other. Which simplifies the creation of large applications.
Main stages of development
In 1979-80, Bjarne Stroustrup developed an extension to the C language - "C with Classes". In 1983 the language was renamed C++.
In 1985, the first commercial version of the C++ language was released, as well as the first edition of the book "The C++ Programming Language", which represented the first description of this language in the absence of an official standard.
Was released in 1989 new version C++ 2.0 language, which included a number of new features. After this, the language developed relatively slowly until 2011. But at the same time, in 1998, the first attempt was made to standardize the language by the ISO organization (International Organization for Standardization). The first standard was called ISO/IEC 14882:1998, or C++98 for short. Subsequently, in 2003, a new version of the C++03 standard was published.
In 2011, the new C++11 standard was published, which contained many additions and enriched the C++ language with a large number of new functionality. Following this, a small addition to the standard, also known as C++14, was released in 2014. And another key release of the language is scheduled for 2017.
Compilers and development environments
To develop programs in C++, you need a compiler - it translates the source code in C++ into an executable file, which you can then run. But at the moment there are many different compilers. They may differ in various aspects, in particular in the implementation of standards. A basic list of compilers for C++ can be found on Wikipedia. It is recommended for development to choose those compilers that are developing and implement all the latest standards. Thus, throughout this tutorial we will primarily use the freely available g++ compiler developed by the GNU Project.
You can also use integrated development environments (IDEs) to create programs, such as Visual Studio, Netbeans, Eclipse, Qt, etc.
When your reputation works for your profit
Community management
Creation of Tone of Voice. Prompt processing of both negative and positive comments on behalf of the brand. Communication management according to specified scenarios. Translation of problematic issues to the customer.
Agents of influence
Creation and implementation of “virtuals” on forums and in social networks. There is a database of upgraded and live accounts on more than 300 sites.
Working with reviews
Writing, coordinating and posting reviews about the brand on top platforms and review sites. Processing and covering negative comments with positive ones. As a result of search results the negativity is gradually replaced.
Social media monitoring
Working with Youscan, IQbuzz, Brand Analytics systems. Control of brand mentions. Identifying key insights and promptly responding to negativity. An indispensable tool for control feedback from clients.
Analytics and research
Analysis information field, research of the product category and the brand's main competitors. This tool covers tasks from reputation monitoring and real-time marketing to in-depth research.
SERM
Detailed analysis search results for selected keywords. Collecting references about the client on social networks, forums and news sites. Developing a strategy for dealing with negative information. The client receives fully controlled delivery in the TOP10.
Why C++
C++ is currently considered the dominant language used for developing commercial software products. In recent years, this dominance has wavered slightly due to similar claims from a programming language like Java, but the pendulum of public opinion has swung the other way, and many programmers who abandoned C++ for Java have recently rushed back to his former affection. In any case, the two languages are so similar that once you learn one, you automatically master 90% of the other.
C# is a new language developed by Microsoft for the networking platform. Essentially, C# is a variation of C++, and despite a number of fundamental differences, the languages C# and C++ are approximately 90% the same. It will probably be a long time before C# competes seriously with C++; but even if this happens, knowledge of the C++ language will be a significant advantage.
C++ is a general purpose programming language. Its natural area of application is system programming, understood in in a broad sense this word. In addition, C++ has been successfully used in many application areas that go far beyond this scope. Implementations of C++ are now available on all machines, from the humblest microcomputers to the largest supercomputers, and on virtually all operating systems.
The emergence and evolution of the C++ language
Bjarne Stroustrup is the developer of the C++ language and the creator of the first translator. He is an employee of the AT&T Bell Laboratories Research Computing Center in Murray Hill (New Jersey, USA). He received a Master's degree in Mathematics and Computer Science from the University of Aarus (Denmark), and a Doctorate in computer technology at Cambridge University (England). He specializes in the field distributed systems, operating systems, modeling and programming. Together with M. A. Ellis he is the author complete guide for the C++ language - "C++ Guide with Notes".
Of course, C++ owes a lot to the C language, which remains as a subset of it. All low-level C tools designed to solve the most pressing problems have also been retained. system programming. C, in turn, owes a lot to its predecessor, the BCPL language. The BCPL language commentary has been restored in C++. Another source of inspiration was the SIMULA-67 language; it was from it that the concept of classes (along with derived classes and virtual functions) was borrowed. C++'s ability to overload operators and the freedom to place declarations wherever an operator may occur are reminiscent of the ALGOL-68 language.
More early versions languages called "C with classes" have been used since 1980. This language arose because the author needed to write interrupt-driven simulation programs. The SIMULA-67 language is ideal for this, efficiency aside. The C language with classes was used for large modeling problems. At that time, the possibilities of writing programs on it for which time and memory resources were critical were subjected to strict testing. The language lacked operator overloading, references, virtual functions, and many other features. C++ was first released outside of the author's research group in July 1983, but many of the features of C++ had not yet been developed.
The name C++ (C plus plus) was coined by Rick Maschitti in the summer of 1983. The name reflects the evolutionary nature of the changes in the C language. The notation ++ refers to the operation of growing C. The slightly shorter name C+ is a syntax error. In addition, it has already been used as the name of a completely different language. Experts in C semantics find C++ worse than ++C. The language is not named D because it is an extension of C and does not attempt to solve any problems by eliminating the features of C. Another interesting interpretation of the name C++ can be found in the appendix to .
C++ was originally conceived so that the author and his friends would not have to program in assembly language, C, or other modern high-level languages. Its main purpose is to simplify and make the programming process more enjoyable for the individual programmer. Until recently, there was no plan for C++ development on paper. Design, implementation and documentation proceeded in parallel. There has never been a "C++ Project" or a "C++ Development Committee". Therefore, the language has evolved and continues to evolve in such a way as to overcome all the problems faced by users. The author’s discussions of all problems with his friends and colleagues also serve as impetus for development.
Since the publication of the first edition of this book, the C++ language has undergone significant changes and refinements. This mainly concerns ambiguity resolution in overloading, binding and memory management. However, minor changes were made to increase compatibility with the C language. Some generalizations and significant extensions were also introduced, such as multiple inheritance, member functions with static and const specifications, protected members, type templates, and handling special situations. All these extensions and improvements were aimed at making C++ a language in which libraries can be created and used. All changes are described in .
Other extensions introduced between 1985 and 1991 (such as multiple inheritance, static member functions, and pure virtual functions) arose from generalization of C++ programming experience rather than from other languages.
The language extensions made over these six years were primarily aimed at increasing the expressiveness of C++ as a language of data abstraction and object-oriented programming in general, and as a means for creating high-quality libraries with user-defined data types in particular.
Around 1987, it became apparent that C++ standardization work was imminent and that work on it should begin immediately.
AT&T Bell Laboratories was a major contributor to this work. About one hundred representatives from about 20 organizations reviewed and commented on what became the modern version of the reference manual and the source material for ANSI standardization. C++. Finally, at the initiative of Hewlett-Packard, the X3J16 committee was formed within ANSI in December 1989. The ANSI (American Standard) C++ standardization work is expected to become integral part standardization work by ISO (International Organization for Standardization).
C++ developed simultaneously with the development of some fundamental classes.
Tags: History of C, ANSI C, ISO C, C99, C11, ISO/IEC C, C standardization.
Origins
C and is a "by-product" obtained during creation operating system UNIX, which was developed at Bell Laboratories by Ken Thompson, Denis Ritchie and co. Thompson single-handedly wrote the original version of UNIX, which ran on the DEC PDP-7, one of the first minicomputers with only 8K words of main memory (it was 1969, after all).
Like other operating systems of the time, UNIX was written in assembly language. Debugging assembly language programs is a real pain and difficult to improve, and UNIX was no exception. Thompson decided that a high-level language was needed for further development of the OS and came up with a small language B. Thompson took the BCPL language, a system programming language developed in the mid-60s, as a basis. BCPL, in turn, originates from ALGOL 60, one of the very first (and most influential) greatest influence) languages.
Ritchie soon joined the UNIX project and began writing in B. In 1970, Bell Labs purchased a PDP-11 for the project. Since B was ready to run on the PDP-11, Thompson rewrote part of UNIX into B. In 1971 it became clear that B was not quite suitable for the PDP-11, so Ritchie began creating an expanded version of B. At first he called it NB (New B ), but when the language became very different from B, the name was changed to C. By 1973, the language had become stable enough for UNIX to be rewritten in it. Switching to C provided an important advantage: portability. By writing a C compiler for each of the machines at Bell Labs, the development team could port UNIX to them.
Standardization
C continued to evolve in the 70s, especially between 1977 and 1979, when the first book on C was published. The C Programming Language, written by Brian Kernighan and Denis Ritchie and published in 1978, became the bible of C programmers. In the absence of an official standard, this book - also known as K&R, or the "White Book" as C fans like to call it - has become the de facto standard. In the 70s there were few C programmers and most of them were UNIX users. However, in the 1980s, C expanded beyond the narrow confines of the UNIX world. C compilers have become available on a variety of machines running different operating systems. In particular, C began to spread on the rapidly developing IBM PC platform.
Along with the increase in popularity came problems. Programmers who wrote new compilers took the language described in K&R as a basis. Unfortunately, in K&R some features of the language were described vaguely, so compilers often interpreted them at their own discretion. In addition, the book did not make a clear distinction between what is a feature of the language and what is a feature of the operating system. UNIX systems. What made the situation worse was that after the publication of K&R, C continued to develop: new features were added to it and old ones were cut out of it. Soon there was an obvious need for a comprehensive, accurate and relevant modern requirements description of the language. Without such a standard, dialects of the language began to appear, which interfered with portability - the greatest strength of the language.
The development of the American C standard began in 1983 under the auspices of the American National Standards Institute (ANSI). After many revisions, the standard was finalized in 1988 and formally adopted in December 1989 as ANSI X3.159-1989. In 1990, it was approved by the International Organization for Standardization (ISO) as the international standard ISO/IEC 9899:1990. This version of the language is usually called C89 or C90, to avoid confusion with the original version of C, which is usually called K&R C.
The language underwent minor changes in 1995 (the changes are described in a document commonly called Amendment 1). More significant changes occurred in 1999, when the ISO/IEC 9899:1999 standard was published. The language described in this standard is usually called C99. The terms "ANSI C", "ANSI/ISO C" and "ISO C", once used to describe C99, have two meanings due to the existence of two standards.
In 2011, along with the revision of the C++ language, the C11 standard was released. Despite the existence of the '11 standard, many compilers still do not fully support even the C99 versions, so the use of the C11 standard will be explicitly stated.