3 ms·
Use C++ if you're interested in writing high level abstractions that resonate with the underlying hardware. Assembly and C map very closely to actual hardware,
by codex 13y ago
Use C++ if you're interested in writing high level abstractions that resonate with the underlying hardware.
Assembly and C map very closely to actual hardware, but don't have a very high abstraction capability.
Haskell, Erlang, Python, LISP, etc. have abstractions up the wazoo, but there's big box labelled "magic" between what you write, and what gets run. That's because it's easy to construct systems which have nice theoretical properties, but are completely incongruent with shipping chips, requiring a black box in the middle that is doing who-knows-what kinds of translations, continuously.
Intel will never ship a CPU which natively executes functional code, for example, because fundamentally computation is an imperative process. You have information (entropy) and you want to turn it into a useful result; that involves moving bits, comparing them, performing simple computations on them, and iterating. That's what chips do, and that's what C++ does too--the fundamentals--but with more abstractive power than C when it is needed.
If you think that being both "in tune" with the hardware and achieving high abstraction in a single language is difficult, you're right--and C++ is difficult to learn and use. There is no free lunch there. But the results speak for themselves. Almost every single piece of software I use on a daily basis is written in C++.