C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Pragmas using multiple C++ standards within the same project

From: Mehmet Kayaalp <mehmet.kayaalp_at_[hidden]>
Date: Sat, 26 Nov 2022 16:30:42 -0500
Thiago, Sebastian, Bo, and Arthur: Thank you for your feedback and drilling
questions. Based on your input, I revised the following sentence to
disambiguate my intention (see the italicized parts):
I fail to understand why we don’t come up with *new preprocessor/compiler
directives* for each *translation unit*, indicating which compiler version
should compile it to produce the intended assembler code (instead of
compiling the entire set of codes with a single compiler).

You all noted that this has already been done by others. But all mentioned
solutions were outside of C++ standards; thus, they do not affect the
decision-making of the C++ standardization committee. Without an intrinsic
C++ solution that enables us to use the existing libraries and legacy
codes, the C++ standardization committee would not attempt to eliminate the
old baggage, simplify the language significantly and make the new C++ a
more coherent language.

> Why do we have to "eliminate" the old features? Just stop using them!
The backward compatibility requirement (along with the long legacy of C and
C++) makes the modern C++ language very complex, making it too difficult
for newcomers to embrace and learn the language and master the language in
its entirety. A simpler and more coherent new standard can be embraced by
newcomers easily and would provide developers with explicit guidelines
about the preferred features of the language. By ignoring this, we would be
making C++ less and less popular in the coming decades.

We all can agree that such a new standard would not have all the bells and
whistles of the current language, but with the proposed approach, one can
always fall back on using the deprecated features supported by older
standards for more flexibility and control.

Best,
--mehmet kayaalp

Received on 2022-11-26 21:31:20