|
| 1 | +# Advantages |
| 2 | + |
| 3 | +There are a lot of programmers that think C is not language worth learning. Let's review this. C was originally developed for |
| 4 | +the UNIX operating system by Dennis Ritchie. It's quite simple, is not tied to any particular hardware or operating system. **If |
| 5 | +some platform has C compiler, it's worth attention**. C is really general purpose language, so this way **it's so common**. This |
| 6 | +makes **it easier to write programs that will run without any changes on practically all machines that have POSIX compiliant |
| 7 | +API's**. The C language is a middle-level language as it combines the elements of high-level languages (structures, unions, |
| 8 | +enums, functions, conditionals) with the functionalism of assembly language. **It's possible to simulate OOP in C and write an |
| 9 | +operating system. C allows the manipulation of nearly everything** giving the programmer more control over exactly how the |
| 10 | +program will behave and more direct access to the mechanics of the underlying hardware, **while keeping application fully |
| 11 | +portable**. C is often quoted as cross-platform assembly. **C is still one of the most popular programming languages out there |
| 12 | +[at the time of writing it was 2nd language overall](https://www.tiobe.com/tiobe-index/). Overall, C was first most common |
| 13 | +language from 1988 to 2013! It's Popularity is still growing. In the year of writing, C had the highest rise in ratings in a |
| 14 | +year.** C is everywhere. Your keyboard is very propably powered by C, same as your fridge or even modem. **Microsoft Windows was |
| 15 | +developed in C and has nearly 90% market share. Same as Linux, MacOS, iOS, Android and Windows Phone.** The world’s most popular |
| 16 | +databases, including **Oracle Database, MySQL, MS SQL Server, and PostgreSQL are developed in C**. 3D movies are created with |
| 17 | +applications that are generally written in C and C++. The alarm clock that wakes you up is likely programmed in C. Then you use |
| 18 | +your microwave or coffee maker to make your breakfast. They are also embedded systems and therefore are probably programmed in |
| 19 | +C. You turn on your TV or radio while you eat your breakfast. Those are also embedded systems, powered by C. When you open your |
| 20 | +garage door with the remote control you are also using an embedded system that is most likely programmed in C. You park your |
| 21 | +car, go to the shop and use vending machine to get a soda. What language did they use to program this vending machine? Probably |
| 22 | +C. Then you buy something at the store. The cash register is also programmed in C. And when you pay with your credit card? The |
| 23 | +credit card reader is, again, likely programmed in C. **There are many programming languages, today, that allow developers to be |
| 24 | +more productive than with C for different kinds of projects. There are higher level languages that provide much larger built-in |
| 25 | +libraries that simplify working with JSON, XML, UI, web pages, client requests, database connections, media manipulation, and so |
| 26 | +on. But despite that, there are plenty of reasons to believe that C programming will remain active for a long time.** In |
| 27 | +programming languages one size does not fit all. Here are some reasons that C is unbeatable, and almost mandatory, for certain |
| 28 | +applications. **Arbitrary memory address access and pointer arithmetic is an important feature that makes C a perfect fit for |
| 29 | +system programming (operating systems and embedded systems).** **A common language feature that system programming cannot rely |
| 30 | +on it's garbage collection, or even just dynamic allocation for some embedded systems. Embedded applications are very limited in |
| 31 | +time and memory resources. They are often used for real-time systems, where a non-deterministic call to the garbage collector |
| 32 | +cannot be afforded. And if dynamic allocation cannot be used because of the lack of memory, it is very important to have other |
| 33 | +mechanisms of memory management, like placing data in custom addresses, as C pointers allow.** Languages that depend heavily on |
| 34 | +dynamic allocation and garbage collection wouldn’t fit for resource-limited systems. **C has a very small runtime. And the |
| 35 | +memory footprint for its code is smaller than for most other languages.** When compared to C++, for example, a C-generated |
| 36 | +binary that goes to an embedded device is about half the size of a binary generated by similar C++ code. One of the main causes |
| 37 | +for that is exceptions support. Exceptions are a great tool added by C++ over C, and, if not triggered and smartly implemented, |
| 38 | +they have practically no execution time overhead (but at the cost of increasing the code size). **C is a lingua franca for |
| 39 | +developers. Many implementations of new algorithms in books or on the internet are first (or only) made available in C by their |
| 40 | +authors.** This gives the maximum possible portability for the implementation. I’ve seen programmers struggling on the internet |
| 41 | +to rewrite a C algorithm to other programming languages because he or she didn’t know very basic concepts of C. |
| 42 | + |
| 43 | +## The Illuminati doesn't run the world. C programmers do! |
0 commit comments