r/C_Programming • u/Gullible_Ostrich_370 • Jul 17 '26
C with classes
I'm curious to know: who uses some C++ features when coding in C? And what feature(s) are you using?
29
Upvotes
r/C_Programming • u/Gullible_Ostrich_370 • Jul 17 '26
I'm curious to know: who uses some C++ features when coding in C? And what feature(s) are you using?
View all comments
Show parent comment
4
u/HildartheDorf Jul 18 '26
I would love an equivalent of std::unique_ptr when working with libwayland_client or libxcb. The protocols both maps readily to RAII.
RAII isn't perfect though, same application I work on uses Vulkan, which also is kind of object oriented, but maps terribly to RAII and is simpler to handle in 'C-like C++' with manual clean up.