Science and technology

How the C programming language has grown

The C programming language will flip fifty years outdated in 2022. Yet regardless of its lengthy historical past, C stays one of many prime “most-used” programming languages in lots of “popular programming languages” surveys. For instance, take a look at the TIOBE Index, which tracks the recognition of various programming languages. Many Linux purposes are written in C, such because the GNOME desktop.

I interviewed Brian Kernighan, co-author (with Dennis Ritchie) of The C Programming Language guide, to study extra concerning the C programming language and its historical past.

Where did the C programming language come from?

C is an evolution of a sequence of languages supposed for system programming—that’s, writing applications like compilers, assemblers, editors, and in the end working techniques. The Multics challenge at MIT, with Bell Labs as a associate, deliberate to write down the whole lot in a high-level language (a brand new concept on the time, roughly 1965). They have been going to make use of IBM’s PL/1, nevertheless it was very difficult, and the promised compilers did not arrive in time.

After a short flirtation with a subset known as EPL (by Doug McIlroy of Bell Labs), Multics turned to BCPL, a a lot easier and cleaner language designed and applied by Martin Richards of Cambridge, who I believe was visiting MIT on the time. When Ken Thompson began engaged on what grew to become Unix, he created an excellent easier language, based mostly on BCPL, that he known as B. He applied it for the PDP-7 used for the primary proto-Unix system in 1969.

BCPL and B have been each “typeless” languages; that’s, they’d just one knowledge sort, integer. The DEC PDP-11, which arrived on the scene in about 1971 and was the pc for the primary actual Unix implementation, supported a number of knowledge varieties, notably 8-bit bytes in addition to 16-bit integers. For that, a language that additionally supported a number of knowledge varieties was a greater match. That’s the origin of C.

Programming and improvement

How was C used inside Bell Labs and the early variations of Unix?

C was initially used solely on Unix, although after some time, there have been additionally C compilers for different machines and working techniques. Mostly it was used for system-programming purposes, which lined fairly a spectrum of attention-grabbing areas, together with quite a lot of techniques for managing operations of AT&T’s phone community.

What was essentially the most attention-grabbing challenge written in C at Bell Labs?

Arguably, essentially the most attention-grabbing, memorable, and essential C program was the Unix working system itself. The first model of Unix in 1971 was in PDP-11 meeting language, however by the point of the fourth version, round 1973, it was rewritten in C. That was really essential because it meant that the working system (and all its supporting software program) may very well be ported to a special type of pc principally by recompiling the whole lot. Not fairly that easy in apply, however not far off.

You co-authored The C Programming Language guide with Dennis Ritchie. How did that guide come about, and the way did you and Dennis collaborate on the guide?

I had written a tutorial on Ken Thompson’s B language to assist individuals get began with it. I upgraded that to a tutorial on C when it grew to become out there. And after some time, I twisted Dennis’s arm to write down a C guide with me. Basically, I wrote a lot of the tutorial materials, apart from the system name chapter, and Dennis had already written the reference handbook, which was glorious. Then we labored backwards and forwards to clean out the tutorial components; the reference handbook stayed just about the identical because it was so properly completed from the start. The guide was formatted with the troff formatter, one in every of many instruments on Unix, and I did a lot of the formatting work.

When did C turn into a factor that different programmers exterior of Bell Labs used for his or her work?

I do not actually keep in mind properly at this level, however I believe C largely adopted together with Unix for the primary half dozen years or so. With the event of compilers for different working techniques, it started to unfold to different techniques moreover Unix. I do not recall after we realized that C and Unix have been having an actual impact, nevertheless it should have been within the mid to late Seventies.

Why did C turn into such an influential programming language?

The major motive within the early days was its affiliation with Unix, which unfold quickly. If you used Unix, you wrote in C. Later on, C unfold to computer systems that may not essentially run Unix, although many did due to the moveable C compiler that Steve Johnson wrote. The workstation market, with corporations like Sun Microsystems, MIPS (which grew to become SGI), and others, was enabled by the mixture of Unix and C. The IBM PC got here considerably later, about 1982, and C grew to become one of many commonplace languages, beneath MS-DOS after which Windows. And in the present day, most Internet of Things (IoT) units will use C.

C stays a well-liked programming language in the present day, some 50 years after its creation. Why has C remained so standard?

I believe C hit a candy spot with effectivity and expressiveness. In earlier instances, effectivity actually mattered since computer systems have been gradual and had restricted reminiscence in comparison with what we’re used to in the present day. C was very environment friendly, within the sense that it may very well be compiled into environment friendly machine code, and it was easy sufficient that it was straightforward to see methods to compile it. At the identical time, it was very expressive, straightforward to write down, and compact. No different language has hit that type of spot fairly so properly, a minimum of in my humble however appropriate opinion.

How has the C programming language grown or modified through the years?

C has grown modestly, I suppose, however I have never paid a lot consideration to the evolving C requirements. There are sufficient modifications that code written within the Nineteen Eighties wants a bit of labor earlier than it can compile, nevertheless it’s largely associated to being sincere about varieties. Newer options like complicated numbers are maybe helpful, however to not me, so I am unable to make an knowledgeable remark.

What programming issues may be solved most simply in C?

Well, it is a good language for something, however in the present day, with numerous reminiscence and processing energy, most programmers are properly served by languages like Python that handle reminiscence administration and different extra high-level constructs. C stays a good selection for decrease ranges the place squeezing cycles and bytes nonetheless matter.

C has influenced different programming languages, together with C++, Java, Go, and Rust. What are your ideas on these different programming languages?

Almost each language is in some methods a response to its predecessors. To over-simplify a good quantity, C++ provides mechanisms to regulate entry to data, so it is higher than C for actually massive applications. Java is a response to the perceived complexity of C++. Go is a response to the complexity of C++ and the restrictions of Java. Rust is an try to cope with reminiscence administration points in C (and presumably C++) whereas coming near C’s effectivity.

They all have actual optimistic attributes, however in some way nobody is ever fairly happy, so there’ll at all times be extra languages that, of their flip, react to what has gone earlier than. At the identical time, the older languages, for essentially the most half, will stay round as a result of they do their job properly, and there is an embedded base the place they’re completely superb, and it could be infeasible to reimplement in one thing newer.


Thanks to Brian for sharing this nice historical past of the C programming language!

Would you prefer to study C programming? Start with these standard C programming articles from the final 12 months: 5 ways to learn the C programming language in 2022.

Most Popular

breakingExpress.com features the latest multimedia technologies, from live video streaming to audio packages to searchable archives of news features and background information. The site is updated continuously throughout the day.

Copyright © 2017 Breaking Express, Green Media Corporation

To Top