3 ms·
C++ is a monstrosity, but RAII is greatly missed when using C. I'm much more inclined to use Rust these days.
by xedrac 4y ago
C++ is a monstrosity, but RAII is greatly missed when using C. I'm much more inclined to use Rust these days.
- maccard 4y agoAgreed that it's a monstrosity, but the reality is that much of that monstrosity is hiding subtle background issues that exist in C that people don't talk about. look at the implementation of std::vector, and compare that against most of the home rolled macros that (dangerously) wrap calls to realloc, and tell me which one is the monstrosity! Personally, I'm glad someone else wrote vector and that I don't need to handle that.
- xedrac 4y agoI agree. C is absolutely terrible to use for anything that's not trivial. It may have a simple spec, but you pay dearly for it in code complexity. Its abstraction capabilities are only marginally better than writing straight assembly.