DEV Community

estrolabz
estrolabz

Posted on

DAY 03 - Few Days into My SDK in C++… and I'm Already Switching to C

Introduction

So I’ve spent the last few days building the foundation of my SDK in C++. Got a window on the screen. OpenGL is rendering a background colour. Everything works.

But the more I build, the more I realize: this isn’t how I want to keep going.

I’m switching to C.

And here’s why.


I’m Not Building Apps — I’m Building the Foundation

This SDK isn’t just a one-off game or tool. It’s meant to be the backbone for:

  • Games (focused on performance and security)
  • Cybersecurity tools (minimal attack surface)
  • Cross-platform apps (desktop, mobile, and eventually bare metal)
  • My own operating system down the line

With that kind of ambition, every layer needs to be as tight and efficient as possible. That means no assumptions, no magic, no runtime surprises.

And in C++, that’s hard to guarantee.


C++ Fights You When You Want Control

Sure, C++ gives you features. But I quickly realized I was spending more time avoiding them than using them:

  • Avoiding dynamic allocation
  • Avoiding exceptions
  • Avoiding RTTI
  • Avoiding STL
  • Fighting templates when I just need predictable code

I had to constantly disable or override behaviours. It felt like I was writing C anyway — just with C++ in the way.


C Just Makes Sense for What I’m Doing

C gives me:

  • Full control over memory
  • Predictable compilation and ABI
  • Straightforward debugging and binaries
  • Total portability
  • No runtime dependencies I didn’t ask for

When I build a logger in C, I know exactly how it's printed.

When I allocate memory, I know when and how it’s freed.

When I port to my own OS, there’s nothing hidden to re-implement.

C doesn't fight me. It just does what I tell it to do.


This Isn’t Anti-C++

C++ is great for higher-level application logic or large projects with the right architecture. If you're using Qt, Unreal, or big frameworks — totally valid.

But if you're trying to squeeze out every cycle, avoid runtime surprises, and get your code booting off a flash drive eventually — C wins.


What’s Next

I’m rewriting the SDK in clean, modular C. No STL. No templates. Just:

  • Logging
  • Memory
  • Input
  • Rendering
  • Platform abstraction

All portable. All optimized. All mine.

Later, when I build my own OS kernel, I won’t need to rework anything. This C core will already be ready.


Final Thought

This isn’t about hating on modern tools. It’s about knowing what kind of control I need, and using the language that gives me that control without compromise.

C++ is powerful, but I’m building something where power needs to be explicit, not hidden behind layers of abstraction.

I’m only a few days in, and this switch already feels like the right move.

YouTube (STARTING A CHANNEL)

So I have also decided to create videos where I code the entire project and share my process and journey on my YouTube Channel 🙂
https://www.youtube.com/@estrolabz


Contact & Other Socials

https://www.instagram.com/estrolabz/

https://www.patreon.com/c/ESTROLABZ

https://www.youtube.com/@ESTROLABZ

https://github.com/estrolabz

https://dev.to/estrolabz

https://www.reddit.com/r/ESTROLABZ/

https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link

Top comments (0)