714

No offence

you are viewing a single comment's thread
view the rest of the comments
[-] abessman@lemmy.world 7 points 1 year ago

Everything.

Every programming language is an abstraction layer between the programmer and the machine that will run the code. But abstraction isn't free. Generally speaking, the higher the abstraction, the less efficient the program.

C++ optionally provides a much higher level of abstraction than pure C, which makes C++ much nicer to work with. But the trade off is that the program will struggle to run in resource constrained environments, where a program written in C would run just fine.

And to be clear, when I say "low-end hardware", I'm not talking about the atom-based netbook from 2008 you picked up for $15 at a yard sale. It will run C++ based programs just fine. I'm talking about 8- or 16-bit microcontrollers running at <100 MHz with a couple of hundred kB of RAM. Such machines are still common in many embedded applications, and they do not handle C++ applications gracefully.

this post was submitted on 16 Jul 2023
714 points (92.4% liked)

Programmer Humor

32483 readers
166 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS