The Good, The Bad & The Ugly — C Edition 🤠

Milan Parmar
Apr 14 · 3 min read

My first interaction with C has been through the Harvard CS50 course and I have already written a blog about my journey with C and the similarities/differences I have found with JavaScript. You can read it here!

In this blog, I want to talk about ‘the good’ and ‘the bad’ of C and will leave you to decide what aspects of the programme are ‘the ugly’.

The Good — Building Block 🧱

This may not be so much of a direct benefit but I wanted to include this as it shows the foundations of programming. C is considered to be the most fundamental language because many programming languages such as Python, C++, Java, etc are built with the base of the C language. Knowing this, it can help you to learn other programmes easily when it comes to syntax and functions.

The Good — Power & Efficiency 💪🏽

C is a robust language because it has many data types and operators to give you a flexible and broad platform to perform all kinds of operations and functions.

The Good — Portable 📱

C is known to be machine independent or, in other words, flexible because it helps you to run your code on any machine without making any change or just a few changes in the code. Now, isn’t that convenient!?

The Good — Structure and Extension 🤝🏽

C is structure-based meaning that the issues or complex problems are divided into smaller blocks or functions. This helps in easier and simpler testing and maintenance.

Another important ability of C is to extend itself as it has its own set of library. So, it becomes easy to use these functions and we can add our own functions to the C Standard Library and make code simpler.

The Good — Complexity ➕✖️➗➖

C has made program computations very fast and smooth with the use of algorithms and data structures. Thus, the C language can be used in complex calculations and operations such as MATLAB.

The Good — Dynamic Memory Allocation 🧠

C allows for dynamic memory allocation which means you can freely allocate memory at run time. For example, if you aren’t aware of how much memory is required by objects in your program, you can still run a program in C and assign the memory at the same time. I have also written a blog on memory allocation in C which you can read here!

The Bad — No OOP 🚫

Although C is a very vast language, it does not support the concept of OOP but simply follows the procedural programming approach.

The Bad — Error Checking 🪲

When writing programmes, errors or bugs aren’t detected after each line of code. The compiler shows all errors after writing the program and this makes the checking of code very complex in large programs.

The Bad — Exception Handling 🔬

Exception Handling is one of the most important features of programming languages but C does not manifest this feature. While compiling the code, various issues and bugs can occur and Exception Handling allows you to catch the error and take appropriate responses but this isn’t the case in C.

The Bad — Low Level of Abstraction 🧩

Opinions are mixed on this one! Some consider C as a small and core machine language that has minimum data hiding and exclusive visibility that affects the security of this language. Also, low level programming has very little abstraction — you’re writing code much more closely to the computer.

I hope these different aspects of C help you see the pros and cons of the programming language and that you have decided on what you may consider as ‘the ugly’ of C!

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store