Skip to content

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.

3 participants