Re:C++20, How Hard Could It Be
by loxias on Sunday September 25, 2022 @12:48PM
(#32973180)
I've written firmware, systems software, drivers and plenty else this way. Just because the language gives you rope doesn't mean you _have_ to use all of it. I enjoy how terse and straightforward even good ol' structured non-object oriented code can be.
[ Parent
| on HN ]
"Object-oriented" is a niche technique.
Any big-enough system will naturally have some OO-ish parts, just because it has some of almost everything. Most small programs will have none.
Exactly. I couldn't have put it better myself, thanks.
They're techniques after all, models, tools.
same here, but I'm embracing modern c++ these days, not for all low level coding yet though.
Yep, big thing for me is smart pointers and RAII. Everything else is secondary.
I have worked on template-heavy codebases that would really benefit from concepts, though.
Smart pointers and RAII do _so much_! I really like zero-cost abstractions, like a nested scope with a RAII object (which will get optimized out) to implement a BEFORE{} and AFTER{}.
That plus structured bindings return types. :)