Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent null pointer value usage #3824

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sdkrystian
Copy link
Contributor

Continuing the crusade for consistent conventions, this pull request addresses the inconsistent (and incorrect) usage of constructs such as "null" and "null pointer" when referring to null pointer values.

A few related changes are included:

  • The incorrect use of "null pointer"/"null" in [support.exceptions]; replaced with "the null value" to account for fancy pointers.
  • More of a nitpick, but the specifying the "result" of a new-expression sounds more correct than specifying the "value" of the new-expression. While these are synonymous, "result" sounds more correct as a new-expression performs an operation, as opposed to representing some static value. This was applied in http://eel.is/c++draft/expr.new#9.6.1 and http://eel.is/c++draft/expr.new#20.sentence-4

While on the topic, crosslinks linking [conv.ptr] at mentions of "null pointer value" should be changed to [basic.compound[.

@sdkrystian sdkrystian force-pushed the patch-29 branch 2 times, most recently from b2dc837 to 0e6dc2e Compare March 5, 2020 07:54
@zygoloid
Copy link
Member

zygoloid commented Mar 12, 2020

I've pushed a minor fixup to make some of the new wording a little terser. I generally like the direction of using the more-precise defined terms that we now have, but I think this is going further than I'd like: it's useful to be able to say that a pointer is or is not null, and that's part of the very-well-established C++ vernacular, so I think we should define somewhere (maybe [basic.compound]) that a pointer is null if its value is a null pointer value. That would at least avoid a lot of the churn in the library wording.

@zygoloid zygoloid added changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts. labels Mar 12, 2020
@jensmaurer
Copy link
Member

This needs a rebase + force-push, as well as some updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes to the wording or approach have been requested and not yet applied. needs rebase The pull request needs a git rebase to resolve merge conflicts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants