On Sat, 4 Feb 2023 at 20:40, Jonathan Wakely wrote: > > On Sat, 4 Feb 2023, 17:01 Christopher Bazley via Gcc, > wrote: > >> >> Does the lack of support for Clang's nullability qualifiers in GCC >> indicate >> a greater likelihood for my proposed feature to be accepted into GCC? > > > No, I don't think so. I think it would be better to support the same > qualifiers as Clang, not diverge in this way. > Clang’s _Nullable qualifier is broken and pretty useless (even according to the code owner), so good luck with that. In fact I agree with most of his comment at > > https://discourse.llvm.org/t/rfc-optional-a-type-qualifier-to-indicate-pointer-nullability/68004/16 > > I particularly agree that no new language extension is needed to express a > pointer that can be null, that's just how pointers have always worked. A > pointer that cannot be null is more deserving of special attributes or > qualifiers to say that it has additional guarantees that aren't implied by > just being a pointer. > It’s not a matter what which kind of pointer is “deserving”. One choice is pleasant and expressive, whereas the other (C with _Nonnull attributes) is neither type-safe nor ergonomic. Meanwhile, on Reddit, my proposal has an 85% upvote rate, and on LinkedIn, “Great idea and I hope it gets itself in to a future standard, but I couldn't wait for something like that to arrive in C…” I wonder how many other people “couldn’t wait”. I guess they already left the debate. If my proposal has little value to you (quite likely, if you are a C++ >> programmer), please bear in mind that it is just a simple tool (like >> 'const') that individuals can choose to use, or not. It entails only a >> minor change to the semantics of one operator. Yes, it is contagious, but >> nobody will be forced to use _Optional in their project, and it is easy to >> hide using a macro. I don't feel that it deserves to be killed at birth. >> > > Language extensions don't deserve to be added to a compiler just because > somebody put a lot of work into them. > I never said that they did. You’ve conflated two unrelated paragraphs. -- Christopher Bazley