<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 2, 2017 at 8:57 AM, Joerg Sonnenberger via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">> And I think that would commit us to keep C++03 forever, which is<br>
> untenable. Further, I think expecting the minimal maintenance required<br>
> to add "-std=c++03" if a project needs it is not unreasonable.<br>
<br>
</span>Is it untenable? Why? POLA says to give a reasonable behavior and breaking<br>
existing code is not reasonable. Mandating what standard your code uses<br>
is actually a much saner choice. You are still ignoring my main point:<br>
there is no easy way to tell if a given code base needs -std=c++03.<br>
Older versions of SOCI for example worked perfectly well when compiled<br>
in C++11 mode, until you actually triggered an error. The error case<br>
then was far from pretty.<br></blockquote><div><br></div><div>The way I see it, there are two categories of users that care about this change:</div><div>1. C++ developers writing new build systems for new code</div><div>2. Users attempting to compile legacy C++ applications with legacy build systems</div><div><br></div><div>Raising the default language version is a tradeoff that benefits the first group and creates work for the second group. I claim that the first group is larger. C++ as a language is growing, not shrinking. More C++ will be written in the future than has been written in the past. We can't keep piling on legacy forever. At some point we have to compromise backwards compatibility to simplify things for users writing code *today*.</div><div><br></div><div>Raising the default improves things for the first group because they can start to forget about the legacy of C++03/98 etc. People in this group have already forgotten that pre-C++11 exists, except when they have to touch old code. I'm in this group. I routinely run `clang -c` on user code samples, forgetting to pass -std=c++11, and am surprised that we haven't raised the version yet. All new C++ code is using C++11, so the majority of code I see is C++11. For me and other such users, it would be nice if the compiler Did The Right Thing by default. </div><div><br></div><div>The second group wants to build legacy code with build systems that are poorly understood and undermaintained. Frankly, life is already hard for these users. Clang regularly exploits UB in new and interesting ways that break old code. This is just a cost of using a new compiler for a language with undefined behavior. I assume that, as a NetBSD maintainer, Joerg identifies with this group. I don't see the burden for these users as being that great, these users can configure legacy projects with something like 'CXX=clang++ -std=c++03' to opt out of the change. Yes, it's work, but I think the benefits for the larger group outweigh the costs. </div><div><br></div><div>I also don't expect that we will ever worry this much about raising the C++ language standard ever again. I predict that future language standards will be significantly more backwards compatible. However, I'm also prepared to be wrong, and maybe we'll be doing this song and dance again in 10 years.<br></div><div><br></div><div>---</div><div><br></div><div>So far it seems like Joerg is the only one against raising the default C++ language version. We should wait to gather more feedback, but if nobody else comes forward to push back on this, I think it'll happen.</div></div></div></div>