by clappski · 9y ago · 0 comments
Alternatively you can take it the other route and discard RAII but then you're basically just writing C.
Some of the most heinous, insane bugs I have ever seen are because C++ is a complexity nightmare and very intelligent people struggle to get things right. Rust is orders of magnitude safer as it forces you to play with safe constructs only (avoiding surprises left by others, or past you) and wrapping anything explicitly unsafe.
[1] https://blogs.msdn.microsoft.com/vcblog/2016/03/31/c-core-gu...
[2] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus
So, unsafe.
C is a car made in the days when having a safety belt wasn't even a concept, so there is no option to buckle it.