


C and C are iconic languages in which a huge amount of code is written. What path have they traveled to become ones? This article covers the emergence of C and the beginning of its official standardization. Also, you'll learn about C with Classes and its eventual transformation into C .
1969 — 1973. C is born into the world
1969. Apollo 11 visits the Moon. AT&T Bell Labs develops a language we all know today as C. At this time, a Unix operating system is at the early development stage.
In fact, the C language took over the main features from the B language. As well as the origin of its name. As for Unix, it was initially implemented in assembly language and didn't even have a compiler for high-level languages. This project's development attributes to one of the reasons for the C language creation.
In 1971, the compiler and some utilities in C were included in the second version of Unix. And in 1973, the Unix kernel was largely written in C.
1978. The book becomes the first specification
Dennis Ritchie and Brian Kernighan published the first edition of the "The C Programming Language" on February 22, 1978. This book was the first widely available material on the C language.
Figure N1 - Cover of the first edition of the book "C Programming Language"
It has become a standard for C development from the time of its publication until the first official language certification. The "standard" was called K&R—after the first letters of the authors' last names.
This book introduced the "Hello World" program as an example of a minimal working program. After 1978, almost every book on programming languages couldn't do without this code example. Today, displaying "Hello World" as your first program is a well-established tradition.
#include <stdio.h> main() { printf("Hello, World\n"); } </stdio.h>
K&R presented several language features. For example, structures—a set of several variables grouped under a single name for ease of reference, as well as long int and unsigned int data types.
Addition/subtraction operators with assignment also changed in K&R C. Previously, to increase a value by one, you had to write a = 1, but such operators were confusing the C compiler. Besides, the difference between a = 1 (increase by one) and a = 1 (assignment) looked rather fragile from the human point of view. It was in K&R C that these operators turned into familiar ones—a = 1.
The code examples in the book were designed in a uniform style, which was also named after the first letters of the creators' last names. The K&R style is notable for the use of eight whitespaces as the main indentation (although four whitespaces are more commonly used). It is also called the "kernel style", as the Unix kernel is written in this style.
#include <stdio.h> main() { printf("Hello, World\n"); } </stdio.h>
1979. C with classes
In May 1979, Bell Labs employee Bjarne Stroustrup began developing a system that was to be the first Unix cluster. In other words, he started to create a distributed computing system connected to a common network of several computers.
The problem was the lack of a suitable toolkit for this. Among the existing programming languages, there were two options that could help solve this problem, but both had nuances. The BCPL language was fast but unsuitable for large projects as it was quite close to low-level languages. The object-oriented programming language Simula, on the other hand, was suitable for the task but was quite slow. So Stroustrup set out to implement his own C-based language.
As early as October 1979, the CPRE preprocessor, adding classes, to C was ready. The language was called C with Classes. One could write the program code and pass it to the preprocessor. However, it was still considered to be an extension to C.
In addition to classes, the first version of C with Classes included:
- derived classes, but with no virtual functions yet;
- access control;
- constructors and destructors;
- friend classes;
- control and casting of function argument types.
1983. ANSI C
The language was growing in popularity:
- C began to displace Basic as the leading language for programming microcomputers;
- New compilers appeared. What's more, they were written by people who weren't directly involved in the language development.
But even with that popularity, C only had the unspoken standard of K&R. Developers of the compilers were introducing a lot of non-standard changes to the language. This is when the problem of code portability began to heat up. The first C standard began to emerge given this range of issues.
In 1983, the American National Standards Institute (ANSI) formed a committee to draft the specification. The standardization process ended only in 1989, when the first standard for the language was ratified as "ANSI X3.159-1989: Programming Language C". In the same year, the second edition of the book "The C Programming Language" was published, describing the language as it appears in the standard. In a year's time, this standard was approved by the International Organization for Standardization (ISO) with minor changes.
Figure N2 - Cover of the second edition of the book "C Programming Language"
In addition to a setback of changes to the language since K&R, the standard included entirely new features, such as function prototypes and a more sophisticated preprocessor. The standard also included a description of the standard library composition. In addition, some means that hadn't been defined earlier were given more precise definitions.
1983. C with Classes C
In 1982, Bjarne Stroustrup began working on changes that would bring C with Classes out of the state, which its creator called a "medium success". Starting from that moment, it took a year to develop a compiler. Cfront came out in 1983.
Its key feature was that it converted C with classes into C code. After that, the converted code was passed to the C compiler. This feature enabled more people to use the compiler, as well as to use it on an existing Unix infrastructure.
As the language evolved, its name changed several times. It was first called C84 because the community called it just C. However, the name was also misleading, as it was more like a new C standard than a subset of the language. And it didn't actually help with the problem of the previous name. Eventually the language became known as C , that is, C and the increment operator.
When moving from C with classes to C , other new features appeared in the language:
- virtual functions;
- function name and operator overloading;
- references;
- constants;
- improved type checking;
- user-controlled free-store memory control.
The commenting style, which is still used today, took root at this very stage of language development. The style is used in other languages as well.
This is how C lived before the official certification. Stroustrup was rather promptly responding to the programmer community's requests. His was publishing works representing the standard descriptions of the language. So, the language was maintained mainly due to the efforts of its creator.
1985. "The C programming language."
In February 1985, the first distributable version of C was released. In October of the same year, the language creator Bjarne Stroustrup released the first edition of the book "The C Programming Language."
Figure N3 - Cover of the first edition of the book "The C Programming Language"
It became the first tacit standard for the C language just like Kernighan and Ritchey's book "The C Programming Language." It was until the first official standard.
In the book, Stroustrup covered the language features as well as design issues from the C perspective, spicing up each point with plenty of code examples.
Since then, the book has been reprinted three more times, each time with language updates. At the time of writing, the most recent 4th edition includes the C 11 standard.
1989. C 2.0
In July 1989, the Cfront 2.0 compiler was released. It was substantially revised compared to the previous version and also brought novelties to the C language.
At this time, templates have already become the talk of the town. No one doubted that they would be implemented, as it was a realistic objective. As for another potential outstanding feature—multiple inheritance—was a real challenge for the creators from the programming community. Many have said that implementing multiple inheritance in C is impossible. In Simula, for example, a similar suggestion was rejected because of the inevitable complexity of the garbage collector. However, multiple inheritance was badly needed, as it would greatly simplify the development of libraries whose code was quite cumbersome without it.
As a result, multiple inheritance was added in Cfront 2.0 after all. This addition to the language has sparked controversy. For example, some have argued that the Smalltalk language, the epitome of object-oriented programming, doesn't have multiple inheritance. That's why C certainly shouldn't adopt it. The language creator assumed that such a reaction is due to taking multiple inheritance too seriously.
The above C version also introduced:
- pointers to members, which allowed creating pointers to non-static fields and functions;
- static and const member functions;
- access modifier protected;
- type-safe linkage;
- abstract classes;
- new and delete specific to classes;
1990. Borland C
In 1990, Borland released the Borland C integrated development environment for developing C and C programs (what a twist, hah?). It was originally intended for development under DOS, but later Windows support was introduced as well.
Figure N4 - Screenshot from Borland C
Historically, Borland C was a descendant of Turbo C but incorporated the hallmarks of C —support of object-oriented programming.
Each version of the environment had its own compiler supporting its own standards. Over time, Borland C got a lot of specialized libraries for fast application development.
The last Borland C IDE version was released in 1997, after which it was replaced by the Borland C Builder series. The finale of Borland C came in 2000 with the release of Borland C 5.5 coming with a compiler.
Borland C was a nice cozy editor for DOS. There was even some kind of syntax coloring.
Yuri Minaev, the architect of C and C core of PVS-Studio analyzer
Four years after Borland, Microsoft released its Visual C integrated development environment.
1990. Templates and exception handling mechanism in C
In 1986, Bjarne Stroustrup wrote an article "What is Object-Oriented Programming?" in which he voiced three flaws of C :
- a lack of support for parameterized types;
- a lack of standard exception handling mechanisms;
- a lack of multiple inheritance.
Multiple inheritance was introduced in 1989 with C 2.0, and the rest of the flaws were fixed in 1990 with new language features. They were described by Stroustrup in the book "Annotated C Reference Manual".
Templates and exception handling appeared soon, one after another. Templates were approved in Seattle in July, and the exception handling mechanism was approved in Palo Alto in November. Their close releases are due to the fact that both of these innovations address similar problems. According to the language creator himself, templates allow you to reduce the number of errors during program execution by extending the capabilities of the static type system. While exceptions allow you to handle the remaining errors.
Parameterized types were considered back in the first edition of C . Yet they had to be postponed due to a lack of time for sufficient study of design and implementation issues. Exceptions were also postponed for the same reason. And it wasn't for nothing. Their design lasted from 1984 to 1989.
The "Annotated C Reference Manual" also introduced namespaces and the ability to identify types at runtime.
Generic programming started to gain momentum at that point. C with templates was not a pioneer. When creating templates, the creators were drawing ideas from ML, CLU, and Ada programming languages.
However, it is safe to say that C was promoting this paradigm. Templates made it possible to write code without macros in many cases, reducing the chances of shooting oneself in the foot. Here comes a fly in the ointment —the fully operating functionality that simplifies work with generic programming appeared only by C 20. But even that didn't stop programmers when they learned that templates could enable computations at the compilation stage...
On the other hand, exceptions in C are not that clear-cut. Unfortunately, they did not solve all the error handling problems compared to earlier approaches. The control flow becomes non-trivial when using exceptions. There are tons of ways to shoot oneself in the foot with them, such as privately inheriting exceptions, catching exceptions by value, or arranging catch blocks in the wrong order, etc. As a result, some coding standards prohibit their use, such as Google C Code Style.
Philipp Khandelyants, Team Lead of the C and C development team at PVS-Studio
"Annotated C Reference Manual" has become some kind a precursor to the official C standardization. It described all the innovations that would soon become the standard for the language.
In the next series...
In this article, we covered events in the history of C and C from 1969 to 1990. In the next article, we will delve into the history of C from 1991 to the present day:
- Bjarne Stroustrup's book on how C was created;
- C 98 is the first official standard;
- C99—C keeps moving;
- Technical Report 1—new C features on paper;
- Viva64 release, later—PVS-Studio;
- C records what has been achieved (C99, C11), and C gains momentum (C 11, C 17);
- C 20 and C 23.
The above is the detailed content of History of C and C . Part one: emergence and standardization of C language. C with Classes becomes C. For more information, please follow other related articles on the PHP Chinese website!

C Learners and developers can get resources and support from StackOverflow, Reddit's r/cpp community, Coursera and edX courses, open source projects on GitHub, professional consulting services, and CppCon. 1. StackOverflow provides answers to technical questions; 2. Reddit's r/cpp community shares the latest news; 3. Coursera and edX provide formal C courses; 4. Open source projects on GitHub such as LLVM and Boost improve skills; 5. Professional consulting services such as JetBrains and Perforce provide technical support; 6. CppCon and other conferences help careers

C# is suitable for projects that require high development efficiency and cross-platform support, while C is suitable for applications that require high performance and underlying control. 1) C# simplifies development, provides garbage collection and rich class libraries, suitable for enterprise-level applications. 2)C allows direct memory operation, suitable for game development and high-performance computing.

C Reasons for continuous use include its high performance, wide application and evolving characteristics. 1) High-efficiency performance: C performs excellently in system programming and high-performance computing by directly manipulating memory and hardware. 2) Widely used: shine in the fields of game development, embedded systems, etc. 3) Continuous evolution: Since its release in 1983, C has continued to add new features to maintain its competitiveness.

The future development trends of C and XML are: 1) C will introduce new features such as modules, concepts and coroutines through the C 20 and C 23 standards to improve programming efficiency and security; 2) XML will continue to occupy an important position in data exchange and configuration files, but will face the challenges of JSON and YAML, and will develop in a more concise and easy-to-parse direction, such as the improvements of XMLSchema1.1 and XPath3.1.

The modern C design model uses new features of C 11 and beyond to help build more flexible and efficient software. 1) Use lambda expressions and std::function to simplify observer pattern. 2) Optimize performance through mobile semantics and perfect forwarding. 3) Intelligent pointers ensure type safety and resource management.

C The core concepts of multithreading and concurrent programming include thread creation and management, synchronization and mutual exclusion, conditional variables, thread pooling, asynchronous programming, common errors and debugging techniques, and performance optimization and best practices. 1) Create threads using the std::thread class. The example shows how to create and wait for the thread to complete. 2) Synchronize and mutual exclusion to use std::mutex and std::lock_guard to protect shared resources and avoid data competition. 3) Condition variables realize communication and synchronization between threads through std::condition_variable. 4) The thread pool example shows how to use the ThreadPool class to process tasks in parallel to improve efficiency. 5) Asynchronous programming uses std::as

C's memory management, pointers and templates are core features. 1. Memory management manually allocates and releases memory through new and deletes, and pay attention to the difference between heap and stack. 2. Pointers allow direct operation of memory addresses, and use them with caution. Smart pointers can simplify management. 3. Template implements generic programming, improves code reusability and flexibility, and needs to understand type derivation and specialization.

C is suitable for system programming and hardware interaction because it provides control capabilities close to hardware and powerful features of object-oriented programming. 1)C Through low-level features such as pointer, memory management and bit operation, efficient system-level operation can be achieved. 2) Hardware interaction is implemented through device drivers, and C can write these drivers to handle communication with hardware devices.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.