|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2024-10-07 16:36:52
On 10/7/24 1:07 AM, John Maddock via Boost wrote:
>
>>> Should Boost have kept C++03?
>>>
>>
>> This question illustrates a lack of understanding regarding C++
>> backwards compatibility. I have posted an explanation of this at
>> least a dozen times. People don't get it. Here is the LAST time.
>>
>> a) Boost always required that a submission work correctly on the
>> compiler/library standard existent at the time of submission.
>>
>> b) All subsequent versions of C++ compiler/library must be backwards
>> compatible with all previous versions. There have been only a handful
>> of exceptions to this rule in the last 30 years.
> Actually I disagree, there have been a handful of rather high profile
> exceptions, which have required quite a bit of maintenance to make code
> compatible with modern compilers. The removal of std::iterator and
> associated base classes being the most painful recent one.
Hmmm - I'm not seeing a disagreement here. Aside - I always used
Boost.Iterators so I've never seen this.
>> d) Hence, a program written to be compatible with C++03 is (almost)
>> guaranteed to function.
>>
>> As far as I know this policy has never changed in the history of
>> Boost. Probably because it makes no sense to do so. The recent effort
>> to "deprecate" support for older compilers was a total waste of time
>> and effort and added nothing to boost.
>
> It is certainly true that it's pointless to change code that is working
> well. However there are circumstances where some modernization is
> extremely useful, to pick some random examples from Boost.Math:
Right. This is the perview of the library maintainer - if there is one.
>
> * C++11 thread safe static variables are a huge win in code
> simplification and runtime startup cost (we have lots of tabular data). >
> * Post C++11 meta programming is a lot easier on the compiler (shorter
> compilation times) than C++03.
>
> * Post C++17 would let us replace tag dispatching with "if constexpr",
> which is easier to read and quicker to compile.
>
> * We do occasionally get bug reports along the lines of "this code is so
> last century, please modernize". Unless there is a compelling reason to
> do so we (or at least I) tend to resist until there is other maintenance
> going on in that file, but generally removing C++03'isms makes the code
> easier to grok.
Right. But all this is outside of the perview and authority of the
"boost technical leadership" - whatever that is.
>
> * Younger programmers (the ones we need to encourage to join) don't have
> a clue about C++03 style code, and just wonder why the heck you're not
> using lambda's and auto everywhere etc. Eventually my C++03 code will
> look like F77 does to me: so hopelessly outdated that no sane person
> would ever want to work on it.  Sad but true!
Fewer younger programmers inspire me these days.
>
> Best, John.
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk