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

Null handle proposal #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Null handle proposal #23

wants to merge 1 commit into from

Conversation

glennhickey
Copy link
Contributor

An example of a null handle as proposed in #22. I think this is handy, especially when re-working existing code that may rely on checks of the form Node* == nullptr or id == 0.

It's a trivial addition to the interface, but imposes a condition that all implementations reserve the chosen value. Thoughts?

@glennhickey glennhickey mentioned this pull request May 23, 2019
@jeizenga
Copy link
Contributor

I don't see this causing an issue on any existing implementations. In theory we could also accomplish this with ID 0, but it would require a bit of logic in implementations that don't explicitly encode the ID in the handle (namely XG). So yeah, I see the benefit.

@jeizenga
Copy link
Contributor

jeizenga commented Apr 9, 2020

Is there a reason this never got merged? I have an idea I want to try out, and I would need something along these lines for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants