3 ms·
Did you not find that C++11 fixes many of the shortcomings of older C++?
by 72deluxe 11y ago
Did you not find that C++11 fixes many of the shortcomings of older C++?
- catnaroek 11y agoRust is still miles ahead of C++11 and even C++14 in terms of safety. On the other hand, C++ still has the upper hand in the type-level programming department, especially now that Hana exists and will be added to the next Boost release: https://github.com/boostorg/hana https://github.com/boostorg/hana .
- pjmlp 11y agoOnly for skilled developers that care about safety. You cannot take C out of C++, so how much help is C++17 if some cowboys in the team keep doing C style coding? Yes, I know all about static analyzers and code reviews, but the sad truth is that in many companies there are lots of developers and management, that don't care a second about them. This is specially true across companies whose main product isn't software development.
- 72deluxe 11y agoUgh tell me about it. My colleague(s) and superior(s) all write C++ like it is C from 1989. Coding standards exist, but they basically enforce indentation rules. Const-correctness, use of references ("those things with ampersands by them...." said colleague A), exceptions are all unknown to them. Object-slicing is a risk ("what's object slicing??"). Pointers are thrown around, added to multiple lists, no RAII, no initialisation of variables, use of memcpy everywhere, no copy constructors, C-style casts EVERYWHERE (including casting to siblings and their descendants...). Arrays are used everywhere, occasionally vectors are used but used like arrays (which isn't so bad), but they're used alongside arrays instead of replacing them; naked new/delete, use of malloc and realloc periodically; for loops are using instead of STL algorithms. And this is a NEW codebase. I am desperate to leave. Does anyone need a C++ developer? Please, someone help!
- masklinn 11y agoThe issue I think is that C++11 doesn't fix those shortcomings, it does provide better alternatives (though without much of the compiler support Rust does, at least without adding more tools on top), but you have to know about the issues with the originals and find out the alternatives exist.
- 72deluxe 11y agoI see your point. I suppose C++11 and onwards did it quite well in that it is backwards compatible for the most part, and didn't orphan old codebases.