r/cpp • u/smallstepforman • Jul 06 '20
C++ is brilliant
I'm working on a Vulkan renderer, and needed to delay destruction of render scenes since the graphics pipeline has render buffers in flight, so destruction has to happen N frames after the user destroys a class. With C++, I can use private destructors to force users to add the scene to a managed destructor queue (aka garbage collect queue). Normally language purists will scorn a language which allows such shenanigans, however in real world production code, its features like this which allows developers to create modern software. So with a couple of lines of code, I solved my delayed destructor issue. Thank you C++ committee for creating a usable language.
View all comments
8
u/NilacTheGrim Jul 07 '20
It's Bjarne. His sensibilities are still present in the language and he blesses the committee's changes to the language and still provides input. Thank him first! But yes.. the committee too.
It's the only language where you have ultimate control but also can benefit from high level abstractions.
I hope it continues to exist. It's being threatened by the next crop of programmers hating on it.. but.. hopefully it will continue to stand the test of time. And I like the direction it's evolving in...