Blog 2 min read

What Did C Source Code Look Like 25 Years Ago?

Share this article
What Did C Source Code Look Like 25 Years Ago?

C is one of the most popular languages in the world. It was initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs. Many thousands of projects have been developed using C since then. It is used for all kinds of purposes, including operating systems, embedded applications, game development, image processing, word processing, and database engines.

It is interesting to explore the evolution of a language and see how it has changed over years of feedback from developers and end users. We will go back 25 years to discover how some C projects were implemented. Back to 1990: the beginning of Microsoft Word

Developers from that era will remember a time when a typical personal computer might have an 8 MHz processor, 1 megabyte of memory, a 20 megabyte hard disk, and a floppy disk drive. It was a big challenge to develop a word processing application.

Microsoft released the “Microsoft Word 1.1” source code in the Computer History Museum. It is worth taking a look at its source code; even though it was written 25 years ago, we can still learn some interesting techniques from it.

Here’s a code snippet from its source code:

c22

As we can observe, the function was declared in K&R style. All the functions use the same style.

When exploring many “Microsoft Word 1.1” source files and comparing them with recently created C projects, it is surprising to see that the techniques used in these projects do not differ much from those used in “Microsoft Word 1.1.”

Let’s take as example  the following source code:

c1

This code looks as though it came from a C project created recently on GitHub. There is no obvious sign that it is 25 years old.

1994 was the year of the first Linux release

On March 14, 1994, Linux 1.0.0 was released, but development started in 1991, thanks to Linus Torvalds and all the other contributors. The source code of this first version is available here.

Here's a code snippet from the sched.c source file:

c23

When comparing the source files of Linux kernel version 1 with those of the latest versions, what is striking is how similar they are—there have been no major changes in style or in the techniques used. From the beginning, the code was simple, clean and basic.

Conclusion

After this brief trip into the past of C source code, we can see that implementation techniques have changed very little compared with modern C projects.

One of C’s strengths is its stability over the years: it remains a relatively simple language, few advanced mechanisms have been introduced, and the code is still straightforward to understand and maintain.

Share this article