r/C_Programming • u/Ok_Reserve996 • 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.
View all comments
Show parent comment
1
u/flatfinger Oct 19 '26
The language doesn't "detect" them. The design intention of C was that the semantics of
p->foo +=5;would be, essentially, "Tell the execution environment to take the address in p, add the offset offooto it, convert the value 5 to the type ofp->foo, and either perform an operation that adds that to the storage at the indicated address (if the platform can do that in one operation), or read the contents of that storage, add five, and write it back." Ifphappened to hold an address of a structure of*p's type, the effect of that operation would be to add 5 to the value of memberfooof that structure, but the implementation would instruct the execution environment to perform the address calculations and accesses in a manner that was agnostic with regard to any significance that address might have. If the execution environment specifies that it has a region of battery-backed RAM from address 0xC0001040 to 0xC000107F, p holds0xC0001040, p->foo is a uint32 at offset 0x3C, then the above code would add 5 to a 32-bit value stored in addresses 0xC000107C to 0xC000107F inclusive.