From the course: C++ Best Practices for Developers

Old code compatibility - C++ Tutorial

From the course: C++ Best Practices for Developers

Start my 1-month free trial

Old code compatibility

- [Instructor] Bjarne Stroustrup, the creator of C++ and the ISO C++ committee have both stressed the importance of not breaking working code. For this reason, the committee rarely deprecates a language feature. When it does, it is marked deprecated for at least two release cycles before it is removed from the language. Why does old code break? There is no certification for C++ compilers. While modern compilers are unbelievable sophisticated, bugs do occasionally occur. In fact, sometimes programmers exploit known compiler bugs only to have their code break once the issue is fixed. Also, some constructs were poorly designed from the beginning. The lack of a true null value until C++ 11 is a good example of that. It caused a lot of issues. Also, sometimes new code conventions can cause problems. Modern C++ says it crashed at having move constructor defined. I've heard that older code can have crash bugs when built on new compilers because of this new convention.

Contents