<div dir="ltr"><div dir="ltr">On Tue, 7 Dec 2021 at 13:22, Aaron Ballman via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">tl;dr: our Clang "get involved" page implies that proposed extensions<br>
to Clang must also be proposed to a standards committee<br>
(<a href="https://clang.llvm.org/get_involved.html#criteria" rel="noreferrer" target="_blank">https://clang.llvm.org/get_involved.html#criteria</a>). This is a good<br>
goal, but is not inclusive or something we enforce with any<br>
consistency. I'm proposing to clarify our goals in this space and to<br>
better reflect existing practice.<br>
<br>
Inclusivity Issues:<br>
Participating in a standards body is not always free. In fact, it can<br>
be quite expensive depending on where you live and which committee you<br>
want to join. People who wish to join the C or C++ standards committee<br>
as a US national body member have yearly dues in excess of $2000/yr.<br>
Each national body sets their membership fees individually and the<br>
prices range anywhere from free to $7500+/yr. Also, a standards<br>
proposal is not a "one and done" activity and often takes multiple<br>
meetings to see even a trivial proposal adopted, but may require<br>
multiple years for larger proposals. For example, the [[]] attributes<br>
proposal took three years, and _BitInt took over two years with<br>
multiple senior-level engineers working on it. Further, there are<br>
associated travel costs (in non-pandemic times, anyway) with attending<br>
meetings. This is a very significant financial and time burden that I<br>
don't think we should require community members to take on.<br>
<br>
Consistency Issues:<br>
We have never been consistent at enforcing this requirement. Here are<br>
some examples off the top of my head:<br>
<br>
* Nullability qualifiers -- never proposed to WG14<br>
* VLAs in C++ -- never proposed to WG21<br>
* [[]] attributes in C -- proposed to WG14, accepted<br>
* _ExtInt -- proposed to WG14, accepted as _BitInt<br>
* enums with a fixed underlying type in C -- proposed to WG14 (not by<br>
a Clang community member), still not accepted yet<br>
* (This list is not intended to be exhaustive.)<br></blockquote><div><br></div><div>VLAs in C++, [[]] in C, and enums with a fixed underlying type are all instances of accepting a feature from one language mode in another. For those cases, we do have a relevant standard on which to base our behaviour, so I think those meet the current policy.</div><div><br></div><div>Nullability qualifiers are part of the Mac OS language platform's SDK. In this instance, Apple as a platform vendor decided to add an extension, and we as vendors of a compiler that intends to support that platform, implement that extension. I don't think this is all that different from our supporting, say, <immintrin.h> to support intel platforms. Or our supporting MS extensions to support the MS platform.</div><div><br></div><div>For _ExtInt, I specifically asked that this be proposed to WG14, and it was (<a href="https://reviews.llvm.org/D59105#1422089">https://reviews.llvm.org/D59105#1422089</a>).</div><div><br></div><div>So, I think we may be missing some detail from the policy:</div><div>-- sometimes the relevant organization may be the owner of a platform or architecture we care about supporting, rather than a language</div><div>-- features supported for one language mode or platform are allowed to be supported in other configurations too; if we're paying the cost of supporting a feature, we should get as much benefit from it as we can</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Coupled with the time and monetary costs associated with<br>
standardization, inconsistently applying something we say "must"<br>
happen in our documentation is ripe for potential abuse (both<br>
malicious and unintentional).<br>
<br>
To this end, I'm proposing a change along the lines of:<br>
<br>
-  <li>Representation within the appropriate governing organization: For<br>
-  extensions to a language governed by a standards committee (C, C++, OpenCL),<br>
-  the extension itself must have an active proposal and proponent within that<br>
-  committee and have a reasonable chance of acceptance. Clang should drive the<br>
-  standard, not diverge from it. This criterion does not apply to all<br>
-  extensions, since some extensions fall outside of the realm of the standards<br>
-  bodies.</li><br>
+  <li>Plausibility of standardization where applicable: Extensions with an<br>
+  active proposal within a standards committee (C, C++, OpenCL, etc.) are<br>
+  preferred when appropriate. Proposed Clang-specific extensions that are being<br>
+  considered by a standards committee must have a feedback loop between the<br>
+  community and the committee. Clang should drive the standard, not diverge<br>
+  from it, so proposals currently in a standardization pipeline should not be<br>
+  treated as finalized features in Clang until the standardization process has<br>
+  completed and review can be done against the standard defining the feature.<br>
+  Regardless of whether an extension is proposed for standardization, it must<br>
+  be a conforming extension and it should not knowingly impede future<br>
+  standardization efforts.<br>
+  </li><br>
<br>
(I'll post an actual review for the changes, but I wanted folks to see<br>
what I was going for as part of the RFC.)<br>
<br>
The goal of the change is to make the following clear:<br>
<br>
* We /prefer/ extensions to go through a standards body whenever possible<br>
* We require extensions to be conforming and not knowingly impede<br>
future standardization efforts<br>
* Not all extensions are appropriate for standardization and that's fine<br>
* If an extension is proposed to a standards committee, we expect the<br>
community to have an active feedback loop with the committee<br>
* Once a feature has been standardized, we expect Clang to expose the<br>
standardized feature in a conforming way<br>
<br>
I am wondering if others in the community feel we should make<br>
adjustments along these lines to our getting involved page?<br></blockquote><div><br></div><div>I'm hesitant about this direction. Every extension we carry imposes a burden on the project as a whole; while we ask people to stick around and maintain extensions they care about, that only really works in the short term, and in any case our existing set of extensions impose a combinatorial cost on future extensions. Limiting ourselves to extensions we need to support for compatibility with current and future standards helps to reduce this complexity.</div><div><br></div><div>Also, I think it's important that for every extension we carry that could and should be standardized, we encourage the folks proposing it to pursue standardization. I agree that getting things standardized is hard and can be expensive, and that does suck, but if the alternative is saying that we'll carry a grab-bag of extensions that no-one has done the work to standardize, that will be worse. We've seen the effects of GNU C and GNU C++, and their collection of unstandardized extensions, and this rule is an attempt to avoid creating a significantly different "Clang C" or "Clang C++" dialect.</div><div><br></div><div>That said: I think there is room to relax our requirements here for some specific carved-out areas: at least when adding attributes and builtin functions, I don't think we need to look for representation in a standards body.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks!<br>
<br>
~Aaron<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div>