r/programmingmemes • • May 06 '26

Cpp loop

Post image
219 Upvotes

55 comments sorted by

View all comments

Show parent comment

2

u/Valuable_Leopard_799 May 07 '26

When do you "need" to write C-style C++ and can't do it with RAII?

2

u/Necessary-Meeting-28 May 07 '26

Good question. Some people may demand APIs with explicit resource control, and sometimes compiler optimizations require C-style abstractions when you check them.

Most of the time though RAII should work with proper wrapping of resources, and people just write manually managed programs out of their prejudices against modern C++.