-
Notifications
You must be signed in to change notification settings - Fork 246
Design note: Cpp2 name
A: For the same reason as all choices in Cpp2: The goal is to address existing problems in C++ by embracing the solutions and guidance we've already de facto adopted, and to have to explain less rather than more.
"Cpp2" is the best I've found to achieve those goals, for three main reasons...
To have to explain less rather than more, I wanted to do my best to avoid a "cute fun" name whose meaning is not self-documenting.
I've received many suggestions; thank you for all the ideas! Roman numeral suggestions seem to be popular in the past week as of this writing:
- One person suggested "CPPii". Rationale: spell "2" in Roman numerals.
- A different person independently suggested "Cxxi". Rationale: C++ source file extensions sometimes use "cxx" already [see Note], and using the Roman numeral "xxi" == 21 would connote a 21st-century design.
I agree those suggestions are cute, and my reply was: "The Romans would get it! :)" Most C++ programmers today are non-Romans, though, and as much as possible I want to reduce the number of things to explain, and avoid creating new ones.
Historical Note: Why
.cxx
? Because thexx
look like++
that fell over. No, really! I didn't know that for many years, and I agree it's "cute" but it's also nonobvious, at least to me... see also (b) and (c).
(B) Avoid the pitfall of using non-alphanumeric characters in a language name. (Bonus: (c) below inherently accomplishes (b)...)
Many people have suggested "C++2," but a major reason I chose “Cpp2” instead was specifically to address those "+" characters.
To this day, non-alphanumeric names cause ongoing problems for all programming languages and systems that use them (e.g., C++, C#, .NET). The result is that for web searches, domain names, and many other uses those languages have to use workarounds anyway. Just a few examples:
-
.C
vs..cpp
vs..cxx
etc. for C++ source filenames, because we can't use.c++
in most OS filesystems. - "CSharp" as in
https://learn.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/
, because we can't easily use "#" in a URL. (I say "easily" because I expect people to point out that we could try an explicit Unicode U+266F♯
to get a real sharp. But effectively nobody does that, it would make the URL nearly impossible to type by hand, it would be at least visually confusing in a URL which has its own meaning of ordinary#
, ... so many problems.) - "dotnet" as in
https://dotnetfoundation.org/
, because we can't easily use "." at the beginning of a domain name.
I can see people trying such funky names in the old days, but we should have learned by now from this hard-won experience: In the 21st century, I don’t know why anyone would ever put a non-alphanumeric symbol in the name of a programming language. (Or, really, in the name of any product that you want to create an easy-to-use hashtag for that works on all popular social media.)
And, as always in this project, I didn't want to just try to invent a new solution, I wanted to follow existing established best practices... and so I think that the most elegant and obvious way to accomplish (b) is to embrace the de facto solution to that very problem we already have and use everywhere, namely (c)...
This also accomplishes (b), because (b) is pretty much the reason we use "Cpp" everywhere!
For C++ itself, we've already had to resort to “Cpp” widely in conference/organization names, especially in contexts that just don’t allow “+” characters.
- Consider our conferences' domain names: "cppcon.org," "cpponsea.uk," "cppnow.org," "cppnorth.ca," "corecpp.org" -- and several of these conferences have gone all the way and embraced "Cpp" in the conference's official name itself.
- Consider government databases: The Standard C++ Foundation has to be registered as "Standard Cpp Foundation" in some government databases (but not others) because those databases don't allow "+" symbols.
So I decided to embrace that existing "Cpp"-ness, which also helps make it clearer that "Cpp2" belongs at "Cpp" conferences... it really is about cooperatively improving "Cpp"'s own evolution, not creating a competing language.