Switch Theme

C and C++

dev c cpp

1/15/2025

2 min. read

Today I’m going to be writing about two programming languages that seem to always have people fighting over which is better: C and C++.

Introduction

In case you aren’t familiar, everything is basically written in C and C++. Sure, you could go deeper and say that those languages were written in assembly or something (which is half true). In simple terms, the languages have basically written all modern internet, hardware, and software infrastructure for the last half a centuary.

C++ is more recent, in that it was written to be a better alternative than C. Bjarne Stroustrup created it while at Bell Labs, where C also happened to be made.

What does this mean?

I would say C has had much more of an impact on modern software development that C++, purley because C is almost two decades older than the latter, and a few languages came out in between them that were directly inspired from C.

Where did I find the two?

My point of view on this argument has developed quite a bit over the years. In the beginning, as a wee programmer getting started with JavaScript and stuff, I thought OOP was good and for the future. I didn’t think that using more ground-to-earth languages would be something I would ever do, and now here I am, about to start working on a game engine written in C..

I started getting into C++ over COVID when I wanted to make a game for a girl I used to like. After that didn’t work out, it stayed around for a bit, and kept improving on it. This game was known as Terminal Miner. I wrote it on repl.it since I hadn’t gotten used to the whole GitHub thing yet, and I needed an IDE on my Chromebook. My interest resurfaced when I looked into using C++ for Kotlin/Native’s cinterop tool, though namespaces aren’t naturally supported, which made the original project idea impossible, since it relied on third party tools.

I never really got back into C until I rebranded from GamerCoder and opened up Calculus Games, when I started the LevelZ File Format. I forgot you can’t really use C++ with a C library, so I decided to replicate it into its own C library.

It took me a bit to actually understand memory management, but I figured it out. Sometimes garbage collection is helpful, and other times I like being able to control when things get freed from my control.

Why argue?

I think both are good. I don’t see why they can’t co-exist. Use C for high performance projects (or if you need to use Kotlin/Native), and use C++ for everything else. I think the entire fight is kind of diverting us from the real problem, which is figuring out what to name your project once you decide on what language to use.