Replies: 3 comments 5 replies
-
Eventually we'll want to use more C++17 features, and also move on to C++20 not too far in the future. C++17 is now 8 years old, and there really is not much point on being stuck on C++14, a 10+ years old standard. |
Beta Was this translation helpful? Give feedback.
-
In the code, C++17/20 may have some benefits. |
Beta Was this translation helpful? Give feedback.
-
Hi All I'll try to add a few observations here. I've already participated in similar discussions in my career on the topic of when a library should move forward and when it should stay behind. These are certainly impactful decisions that need to be made carefully. Currently, there is support for C++17, with C++20 on the horizon. In my opinion, every newer C++ standard is not only more productive, but, more importantly, safer. This is an area where future standards will focus on most. Moreover, using a newer standard in the compiler doesn’t cost anything extra, so this possibility is essentially a gift that should be wisely utilized—granted that the job, company, and environment allow it. Poco is an OSS project, and any help—even in the form of more usable and safer code—should, in my opinion, be embraced immediately. Features like std::span, std::string_view, std::optional, std::variant, std::any, , and others have breathed new life into many older projects. Every line of code where a developer can utilize these features is money saved. However, there are also projects where Poco is used on very old platforms. The question now is whether it makes sense to stop developing the Poco library entirely because of these few projects, and not take advantage of what is readily available. In my opinion, this could be solved by declaring version 1.13 as LTS, with only CVE fixes applied. If the old code has worked correctly so far, it won't require any new features (or introduce new bugs as a result). The question remains: who would be willing to maintain the LTS version, and under what conditions? One last observation from personal experience—maintaining C++ headers for C++14 while the code is compiled under C++17 is neither simple, nor useful, nor pleasant. In the end, neither group will be happy, IMHO. C++17 support in compilers: https://en.cppreference.com/w/cpp/17 Survey? |
Beta Was this translation helpful? Give feedback.
-
I would like to discuss the C++17 changes.
While it is great to benefit from C++17 features in this project, I see little benefit in forcing all clients that need to compile and link with this project but don't use C++17.
C++17 has introduced some breaks in selected areas and and is not considered a drop in replacement for earlier versions. Moreover, new features makes BWC breaks by definition.
Adding C++17 constructs in public headers of Poco makes it impossible for such projects to compile with it.
A few examples:
Using "__has_include" is only C++17 (Platform.h)
Replacing is_same with is_same_v (Types.h)
While it has some benefit, this is mostly the task of config or CMake to decide such things.
The down side is imposing C++17 on client software.
Beta Was this translation helpful? Give feedback.
All reactions