r/C_Programming • • Oct 18 '26

C limitations

Hi all,

I am currently learning c++. Its okay. Not sexy but also not as bad as some say.

The reason I am learning c++ is that I have read that C has limitations as soon as a project gets more complicated. For example, if you make a scientific calculator with many features like graphs etc.

Trading engines/tools are also not recommended to programm in C.

Since I have not learned C and have only read from some old forum posts etc, I cannot confirm/deny these facts.

I am aware that "everything" is possible and that C++ comes with QoL improvements especially with Classes. But I assume that doesn't mean that someone has to use C only for kernel work. Embedded is also possible with C++ right?

I would appreciate your thoughts and opinions.

The goal of this post is to understand how and if C could fit me more with my goals and what real advantages or disadvantages C has.

51 Upvotes

114 comments sorted by

View all comments

Show parent comment

3

u/septum-funk Oct 20 '26

yes that's true, but a lot of C++'s better features exist just to make code more brief and readable. i'm a bigger fan of C of course, that's plain to everyone, but i don't hate C++ or anything, in fact i hope C continues to add things here and there from C++ mainly namespaces

3

u/sirjofri Oct 23 '26

I wanted namespaces in C for a long time, but then I noticed one thing: If I had namespaces in C, my programs would grow way more complicated than needed. I instead try to use multiple files to structure my code into "namespaces", using the static keyword for local functions. Even though it's a limitation, it makes my life easier by limiting myself to less complex programs in the first place.

Yet still, having namespaces as an option could be very interesting, but I think feature like defer will have a larger impact for me, personally. Though I'm also mostly programming C on Plan 9, which is also special in its own way.

1

u/septum-funk Oct 23 '26

well yes i do that as well, you're going to have to do that if you want to write good C, but having namespaces for libraries would be killer. SDL_Etc becomes sdl::Etc, it basically just eliminates the prefix plague that we have in C