Clever Geek Handbook
📜 ⬆️ ⬇️

C language history

YearC standard
1972Language birth
1978K&R C
1989ANSI C (C89)
1990ISO C (same as C89)
1999C99
2011C11
2017C17 (amended C11)
2018C18 (same as C17)

The C programming language was developed between 1969 and 1973 at Bell Labs laboratories . According to Ritchie , the most active period of creativity occurred in 1972 . The language was called “C” (C is the third letter of the English alphabet ), because many of its features originate from the old language “ B ” (B is the second letter of the English alphabet). There are several different versions of the origin of the name Bi. Ken Thompson points to the BCPL programming language, but there is also Bon , which he also created. Ritchie suggests that the name of the language could be derived from the name of Thompson's wife Bonnie [1] .

By 1973, the C language had become quite strong, and most of the UNIX kernel , originally written in assembly language PDP-11 /20, was rewritten in C. It was one of the very first operating system kernels, written in a language other than assembler; earlier were only Multics (written in PL / 1 ) and TRIPOS (written in BCPL).

Content

Development Reasons

There are several legends regarding the reasons for developing C and its relationship to the UNIX operating system, including the following:

According to one legend, the development of C was the result of the fact that its future authors loved a computer game similar to the popular game Asteroids (Asteroids) [ source? ] . They played it for a long time on the main server of the company, which was not powerful enough and had to serve about a hundred users. Thompson and Ritchie felt that they lacked control of the spaceship in order to avoid collisions with some stones. Therefore, they decided to transfer the game to a free PDP-7 in the office. However, this computer did not have an operating system , which made them write it. In the end, they decided to transfer this operating system to the office PDP-11 as well , which was very difficult because its code was entirely written in assembler . A suggestion was made to use some kind of high-level portable language so that you could easily transfer the OS from one computer to another. The Bi language, which they first wanted to use for this, was devoid of functionality that could take advantage of the new features of PDP-11. Therefore, they settled on the development of the C language.

There is another legend. The first computer for which UNIX was originally written was intended to create a system for automatically filling out documents. The first version of UNIX was written in assembly language. Later, in order to rewrite this operating system, the C language was developed [ source? ] .

K&R C

In 1978, Brian Kernighan and Dennis Ritchie published the first edition of C, the programming language. This book, known as K&R among programmers, served for many years as an informal language specification. The version of C described in it is often called "K&R C". The second edition of this book is about the later ANSI C standard, described below.

K&R introduced the following language features:

  • structures ( struct data type);
  • long integer ( long int data type);
  • unsigned integer ( unsigned int data type);
  • the += operator and similar ones (the old =+ operators misled the C compiler’s vocabulary analyzer, for example, when comparing the expressions i =+ 10 and i = +10 ).

K&R C is often considered the most important part of the language that the C compiler should support. For many years, even after the release of ANSI C, it was considered the minimum level that programmers should have wished to achieve maximum portability from their programs, because not all compilers supported ANSI C then, and good K&R C code was true for ANSI C.

After the publication of K&R C, several features were added to the language supported by AT&T and some other manufacturers:

  • functions that do not return a value (with type void ), and pointers that do not have a type (with type void* );
  • functions that return joins and structures;
  • field names of these structures in different namespaces for each structure;
  • assignment of structures;
  • constant specifier ( const );
  • standard library that implements most of the functions introduced by various manufacturers;
  • enumerated type ( enum );
  • single precision fractional number ( float ).

Language Standards

ISO C

In the late 1970s, C began to displace BASIC from the position of a leading language for programming microcomputers . In the 1980s, it was adapted for use in the IBM PC , which led to a sharp increase in its popularity. At the same time, Björn Straustrup and others at the Bell Labs labs began work on adding object-oriented programming capabilities to C. The language they ultimately made, C ++ , had a great influence on software development, but could not be compared in popularity [2] with C, especially in UNIX-like systems.

In 1983, the American National Standards Institute (ANSI) formed a committee to develop the standard C specification. At the end of this long and complex process in 1989, it was finally approved as the "C Programming Language" of ANSI X3.159-1989 . This version of the language is commonly called ANSI C or C89. In 1990, the ANSI C standard was adopted with minor modifications by the International Organization for Standardization (ISO) as ISO / IEC 9899: 1990 .

One of the goals of this standard was to develop a superset of K&R C that includes many of the language features created later. However, the standardization committee also included several new features, such as function prototypes (borrowed from C ++) and a more sophisticated preprocessor .

ANSI C now supports almost all existing compilers. Almost all of the C code written recently is ANSI C. Any program written only in standard C will be guaranteed to run correctly on any platform that has the appropriate C implementation. However, most programs are written so that they will be compiled and executed only on a specific platform, because:

  1. they use non-standard libraries , for example, for graphic displays;
  2. they use specific platform-specific tools;
  3. they are designed for a certain size value of certain types of data or for a specific way of storing this data in memory for a particular platform.

C99

After standardization in ANSI, the C language specification remained relatively unchanged over time, while C ++ continued to evolve (in 1995, the First Normative Amendment was introduced into the C Standard, but almost no one recognized it). However, in the late 1990s, the standard was revised, leading to the publication of ISO 9899: 1999 in 1999 . This standard is commonly called "C99". In March 2000, it was adopted and adapted by ANSI.

Some of the new features of the C99:

  • inline functions ( inline );
  • declaration of local variables in any program text operator (as in C ++);
  • new data types, such as long long int (to facilitate the transition from 32- to 64-bit numbers), the explicit Boolean data type _Bool and the complex type to represent complex numbers;
  • variable length arrays ;
  • support for restricted pointers ( restrict );
  • named structure initialization: struct { int x, y, z; } point = { .y=10, .z=20, .x=30 }; struct { int x, y, z; } point = { .y=10, .z=20, .x=30 };
  • support for single-line comments starting with // borrowed from C ++ (many C compilers supported them earlier as an add-on);
  • several new library functions, such as snprintf ;
  • several new header files , such as stdint.h .

C11

December 8, 2011 published a new standard for the C language (ISO / IEC 9899: 2011) [3] . Major changes:

  • multithreading support;
  • Improved Unicode support
  • generalized macros (type-generic expressions, allow static overloading);
  • anonymous structures and associations (simplify the call to nested constructions);
  • alignment control of objects;
  • static assertions
  • removal of the dangerous gets function (in favor of the safe gets_s );
  • quick_exit function;
  • function _Noreturn ;
  • new exclusive file open mode.

C18

A draft standard was introduced as C17 (ISO / IEC 9899: 2017) in 2017 [4] . In June 2018, the standard was published as C18 (ISO / IEC 9899: 2018) [5] [6] . The new standard eliminates defects noted in the previous version without adding new features. The names C17 and C18 are commonly referred to as synonyms [6] .

Notes

  1. ↑ D. Ritchie M. The Development of the C Language. Sections "Introduction" and "History: the setting".
  2. ↑ Programming Community Index for April 2012
  3. ↑ ISO / IEC 9899: 2011 - Information technology - Programming languages ​​- C
  4. ↑ ISO / IEC. ISO / IEC9899: 2017 . Programming languages ​​- C (unopened) (link unavailable) (2017) . Date of treatment February 2, 2019. Archived October 24, 2018.
  5. ↑ ISO / IEC 9899: 2018 - Information technology - Programming languages ​​- C (neopr.) . www.iso.org .
  6. ↑ 1 2 Using the GNU Compiler Collection (GCC): C Dialect Options . gcc.gnu.org. Date of treatment December 3, 2018.

Literature

  • Ritchie D.M. The Development of the C Language (English) // www.bell-labs.com: website. - 1993.
Source - https://ru.wikipedia.org/w/index.php?title= SI_Language_History&oldid = 99484476


More articles:

  • KIT Studios
  • Ponomarev, Ardalon Nikolaevich
  • Zhang Juzheng
  • Major League Baseball in the 2002 season
  • Bartholomew (first name)
  • QNews
  • D'Age, Ludwig
  • Samota, Paramjit
  • All City
  • Parthenon (Internet show)

All articles

Clever Geek | 2019