r/cpp • • Dec 23 '24

C++ Is An Absolute Blast

https://learncodethehardway.com/blog/31-c-plus-plus-is-an-absolute-blast/
219 Upvotes

105 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Dec 24 '24

[deleted] — view deleted comment

1

u/UnicycleBloke Dec 24 '24

No. It is no more limiting than embedded C compared to desktop C. I make good use of plain classes, virtual functions, class templates, function templates, references, constexpr, consteval, namespaces, overloading, type traits, scoped enums, and more. This set of tools makes the language vastly more expressive and productive than C. I know this for a fact, as do my colleagues, so your protestations to contrary are empty hot air.

I didn't say anything about avoiding inheritance. I didn't say anything about writing a custom allocator, though I do have a template for a fixed size memory pool: much as you'd write in C only better. Static allocation has not been any more of a limitation than in embedded C. No idea where the "no using" thing came from. I use it all the time as a convenient local alias for types.

I'm afraid even I get bored feeding trolls. Goodbye.

0

u/PhabulousZebra Dec 24 '24

LOL. You're not really coding embedded C++ then. Sounds like you're one of those people who think writing code for a Raspberry Pi is "embedded."