C Programming Language
The C Programming Language was developed by Dennis Richie and Ken Thompson at Bell Laboratories between 1969 and and 1973. It was the successor to B and used to create Unix. The recent bad experience with the Multics time sharing operating system development had made Bell Laboratories sensitive to that sort of cost blowout so the project was not widely promoted until the first working version was complete.
So what did C bring to the table that made it such a valuable asset? Here is a list:
- can be used to directly interface to and manipulate hardware and IO
- so it allows you to get close to the hardware itself
- was a procedural programming language supporting structured programming
- can be used to write an operating system
- or sits very close to the operating system
- had flexible naming conventions
- had flexible memory allocation (static, local, global and dynamic)
- could be compiled to machine language with a relatively simple compiler
- is portable (mostly)
- compiles to very fast executing code
- compiled program can run without an operating system and do not need a virtual machine or any other components
The disadvantage compared to more modern procedural programming languages is that you usually do more typing to achieve the same outcome, it isn’t object oriented by nature and the variable typing is flexible so you can create some spectacular program failures if you get the cast wrong or convert a void pointer (no type associated with it) to the wrong data type. And one big compatibility issue is Endianness where different computing architectures store multi-byte data with the high byte at the top or bottom of the word so you can’t just swap binary data and expect it to always work. So you surely you would think we would have moved on to something better?
Programming Language Usage Trends
A recent study of computer language trends over the past 10 years by Embedded Gurus shows that unlike the anticipated rise of the C++ Programming Language in embedded systems, the use of C is rising and C++ falling. You can read the full article at C: The Immortal Programming Language where we see that Assembly Language use is falling as expected, the use of C Programming Language is actually rising.
Now to be clear, this is for Embedded Software Development. In Top Programming Languages 2017 we see that Python is the most used programming language in the world across all domains with the C Programming Language coming in second overall. This is a very big jump for Python but also a jump for the C Programming Language.
Successful Endeavours Programming Languages
At Successful Endeavours the majority of our embedded systems code is written using the C Programming Language . Our Windows code is a mixture of C and C++. For website development it is PHP and Python. So that’s 4 of the top 10 programming languages listed in Top Programming Languages 2017 .
So I expect we will be continuing to program systems using C for quite some time to come. Especially smaller system that don’t have an Operating System. Now maybe someone should focus a but more attention on teaching C to the next generation of programmers.
Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In Australia. Ray Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.