In the world of software engineering, there is a constant change. Anything we learn has a potential to get redundant just in a matter of years. A lot of languages, methodologies, techniques, tools, frameworks, libraries came in with a huge noise and went away silently. Very few things manage to live for a decade. However, there is one thing which has been there for more than half a century, and remained unchanged. It is the core of all operating systems, and also all compilers and interpreters of unexceptionally all programming languages, and it is also the father of almost all mainstream languages we use today. Yes, we are talking about the C Programming Language. The bedrock of software as we know it.Before going into the details, I want to dedicate this series to my older brother Ali Cihan, who encouraged me to learn C programming language, and guided towards the right direction in programming when I was a 16 year old boy. I am really grateful to him.
In this very first part of this blog post series, I will be talking about the brief history and birth of C.
Part 1 – Origins of C
It all started in Bell Labs. Bell Labs is a research and development company in US. It is credited with transistor, laser, photovoltaic cell, radio astronomy and many more. They are not limited with electronics, the Unix operation system and C programming language are also developed in Bell Labs.
C is created by Denis Ritchie and it mainly influenced by another language used in Bell Labs, called B. B was designed and created by Denis Ritchie’s colleague, Ken Thompson. The name B refers to the word Bell, and the name C is chosen since it is the letter after B. Both B and C were following a tradition coming from a language family called ALGOL (Algorithmic Language) developed in 1958.
The reason of the need for C programming language was clear, all existing programming languages had a deficiency in terms of portability and efficiency for a large scale system-level project. For instance, Assembly language was bounded with the architecture of the specific hardware it is written for. This means that every single piece of code needs to be re-written for a specific hardware. In response to Assembly, languages like B and BPL were developed. However, they weren’t covering the need. B was lacking of data structures, for instance. Furthermore, it had performance issues in system-level programming. BPL had a verbose syntax which makes large scale projects very difficult. C changed the game since it had readability and writability of a high level language and capability and performance of a low level language. Furthermore, its structure allowed to write reusable code and structure large-scale solutions. All these made C the monopoly of system programming for almost half a millennia.
Basic Aspects of C
Let’s look at some details which made C as an unbeatable language.
Direct Memory Access: C has direct access capability to memory using pointers. This allowed developers to write code that could directly manipulate hardware and memory, similar to assembly language.
High-Level Constructs: C offered high-level programming constructs such as loops, conditionals, and functions. This combination allowed programmers to write better code without sacrificing the ease of use found in higher-level languages.
Hardware Independence: One of the primary design goals of C was portability. Code written in C could be compiled and run on different types of hardware with minimal changes. This was an important advancement over Assembly.
Standard Library: C’s standard library provided a collection of functions for performing common tasks, ensuring that these functions would behave consistently across different systems. This further enhanced the portability of C programs.
Minimalist Design: C was designed to be simple and minimalistic. It included only the essential features needed for system programming, avoiding the complexity and verbosity of languages like PL/I or ALGOL.
Type System: Although simpler than modern type systems, C’s type system was stronger than those of some contemporaries like BCPL. It included primitive data types (int, char, float, etc.) and allowed for the creation of complex data types through structs and arrays. The introduction of a better type system helped catch errors at compile time, improving the reliability of code.
Control Structures: C included a rich set of control structures (such as if-else, switch, for, while, and do-while loops), which facilitated structured programming and improved code readability compared to the goto-heavy styles of assembly language and some older high-level languages.
Modularity: C introduced the concept of modular programming through functions. Programs could be broken down into smaller, reusable functions, making code more organized and easier to manage.
Standardization of C
ANSI, the American National Standards Institute, set the standards for C. This helps developers work together better, makes different systems compatible with each other, and encourages using the best methods.
ANSI set 3 standards for C and these versions provide a standardized framework for C to ensure consistency and compatibility across different platforms and implementations. First standard was ANSI C89/C90. It was approved by ANSI in 1989 and later adopted as an international standard by ISO in 1990. ANSI released an updated version of the standard in 1999, known as ANSI C99. This version introduced several new features and improvements to the language, such as inline functions, variable-length arrays, and new data types like long and bool. ANSI C11, released in 2011, brought further enhancements to the language. It introduced features like Generic Selection, Multi-threading support, and Atomic operations. ANSI C11 aimed to improve the expressiveness, safety, and performance of the language while maintaining backward compatibility with previous versions.
In summary, the combination of strong features made C a revolutionary language for its time. It bridged the gap between low-level hardware control and high-level programming abstractions. It has been offering portability, efficiency, and simplicity, furthermore it still does. These aspects not only distinguished C from the other languages of its time, but also set the foundations for many future programming languages. This is why it deserves to be called as bedrock of the software as we know it.
Suleyman Cabir Ataman, PhD
Leave a Reply