| 1 | = Guidelines to implement policy on Boost library evolution (was Boost 2.0) = |
| 2 | |
| 3 | The Boost Steering Committee has already set the overall library evolution policy. This wiki page is the current draft of guidelines to implement that policy. |
| 4 | |
| 5 | == Draft Guidelines == |
| 6 | |
| 7 | The C++ standards committee is releasing new or revised language and library features on a regular basis. See https://isocpp.org/std/status. |
| 8 | |
| 9 | Compiler and standard library implementers are adding support for new language and library features piecemeal, each in a different sequence. |
| 10 | |
| 11 | |
| 12 | Thus as seen by Boost developers and other users, C++ is a continuously moving target. That's very good for C++; it means the language, standard library, and their implementations are evolving rapidly to meet today's changing needs. |
| 13 | To thrive in this continuously evolving environment, Boost libraries need to evolve continuously. In other words, Boost 2.0 makes limited sense; it would start to become obsolete the moment it shipped. Instead, Boost's policy is to have "continuous evolution". Boost also recognizes that users will not migrate to new compiler and Standard Library releases at the same rate, and that some prefer that Boost support older compilers for an extended period. |
| 14 | |
| 15 | |
| 16 | The following guidelines are subject to change, but reflect the current Boost policy. |
| 17 | |
| 18 | === Existing Boost libraries === |
| 19 | |
| 20 | * If a new C++ feature can be conditionally added (via #ifdef or a macro such as BOOST_NOEXCEPT), libraries may do so as soon as any implementation being regression tested supplies the feature. The more useful the feature is to the Boost library's users, the more strongly the library maintainer is encouraged to start conditionally using the feature. |
| 21 | * If a new C++ feature cannot be added conditionally (for example, because it would cause breaking interface changes), maintainers may add a new version of the library that uses the new feature unconditionally, while continuing to support the old version. ''Maintainers may choose to seek a replacement for the old version of the library, of course.'' Because two versions of a library are painful to maintain and confusing to users, this approach is only encouraged when the advantages of using the new C++ feature would be of great benefit to library users. This is appropriate only when there is regression test coverage, for at least one implementation, of the new feature. |
| 22 | * Once a C++ feature has been shipping by all major C++ implementers for several releases, Boost libraries may use the feature unconditionally and stop supporting older versions that do not provide the feature.. The maintainer of each Boost library must weigh the pros and cons of dropping support for older compilers and standard libraries, and consult users to gauge impact of such a change. Example: As of mid-2014, major compilers such as Clang, GCC, and Visual C++ have supported auto, decltype, nullptr, doubled right angle brackets, long long, r-value references, static assert, and built-in type traits for at least three major releases, so these C++11 features are among the first a Boost library might consider using unconditionally. If conditional support or two library versions do not cause an unwanted burden, maintainers are free to continue that approach into the future. |
| 23 | |
| 24 | === New Boost libraries === |
| 25 | |
| 26 | * Authors of new libraries are encouraged to use the approaches described above to support platforms that do not support new C++ features. New libraries will not be rejected because they lack support for older platforms, if new language or library features are integral to the library interface or design. Indeed, Boost encourages the development of new, state-of-the-art libraries. An example would be a library that cannot provide a usable interface without use of a new C++ feature. (This guideline is admittedly vague. The intent is to encourage innovative user interfaces, and if that means very limited compiler or standard library support initially, that is acceptable.) |
| 27 | |
| 28 | ---- |
| 29 | |
| 30 | |