SE-0181 : should c++ be written "cxx" or "cpp" ?


(Trevör Anne Denise) #1

Hello everyone,

After quickly reading "SE-0181: Package Manager C/C++ Language Standard Support" I noticed that as Swift doesn't support "+" sign in identifiers, the format "cxx" was used (as in "CXXLanguageStandard"), why isn't "cpp" used instead of "cxx" ?

Trevör


(Greg Parker) #2

Several Swift developers came from clang, and clang uses "CXX" almost everywhere.

One reason for clang to use "CXX" is that "CPP" is historically also used for the C preprocessor. Using "CPP" for C++ would risk ambiguity.

···

On Jul 12, 2017, at 10:21 AM, Trevör ANNE DENISE via swift-evolution <swift-evolution@swift.org> wrote:

After quickly reading "SE-0181: Package Manager C/C++ Language Standard Support" I noticed that as Swift doesn't support "+" sign in identifiers, the format "cxx" was used (as in "CXXLanguageStandard"), why isn't "cpp" used instead of "cxx" ?

--
Greg Parker gparker@apple.com <mailto:gparker@apple.com> Runtime Wrangler


(Chris Lattner) #3

Little known fact: + is just an x with the unicode 45° combining character applied to it. :wink:

-Chris

···

On Jul 12, 2017, at 2:21 PM, Greg Parker via swift-evolution <swift-evolution@swift.org> wrote:

On Jul 12, 2017, at 10:21 AM, Trevör ANNE DENISE via swift-evolution <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:

After quickly reading "SE-0181: Package Manager C/C++ Language Standard Support" I noticed that as Swift doesn't support "+" sign in identifiers, the format "cxx" was used (as in "CXXLanguageStandard"), why isn't "cpp" used instead of "cxx" ?

Several Swift developers came from clang, and clang uses "CXX" almost everywhere.


(Trevör Anne Denise) #4

T̠̃Hͤ̊͢Í̀S̡̤̣ M̡̌̃̃Å̤̃Ḳ̊Ě̀̊S Ṣ̡̣́E̤ͤÑ̠Ṣ̊̀̌Ẽ

···

Le 13 juil. 2017 à 00:59, Chris Lattner <clattner@nondot.org> a écrit :

On Jul 12, 2017, at 2:21 PM, Greg Parker via swift-evolution <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:

On Jul 12, 2017, at 10:21 AM, Trevör ANNE DENISE via swift-evolution <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:

After quickly reading "SE-0181: Package Manager C/C++ Language Standard Support" I noticed that as Swift doesn't support "+" sign in identifiers, the format "cxx" was used (as in "CXXLanguageStandard"), why isn't "cpp" used instead of "cxx" ?

Several Swift developers came from clang, and clang uses "CXX" almost everywhere.

Little known fact: + is just an x with the unicode 45° combining character applied to it. :wink:

-Chris


(Jean-Daniel) #5

Sorry to be pedantic, but this is not x, but × that is + with unicode 45° :wink:

···

Le 13 juil. 2017 à 00:59, Chris Lattner via swift-evolution swift-evolution@swift.org a écrit :

On Jul 12, 2017, at 2:21 PM, Greg Parker via swift-evolution swift-evolution@swift.org wrote:

On Jul 12, 2017, at 10:21 AM, Trevör ANNE DENISE via swift-evolution swift-evolution@swift.org wrote:

After quickly reading “SE-0181: Package Manager C/C++ Language Standard Support” I noticed that as Swift doesn’t support “+” sign in identifiers, the format “cxx” was used (as in “CXXLanguageStandard”), why isn’t “cpp” used instead of “cxx” ?

Several Swift developers came from clang, and clang uses “CXX” almost everywhere.

Little known fact: + is just an x with the unicode 45° combining character applied to it. :wink: