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

Adds the Nil UUID as a constant to the module exports. #236

Closed
wants to merge 1 commit into from

Conversation

michaelshaffer37
Copy link

This seems kinda trivial, but I had an occasion a few weeks ago where I needed the NIL UUID value obviously this is easy enough to just define as a constant. But I thought that it would have been included as part of this package and was surprised not to find it as it's part of the UUID specification. However when I went to add it to node-uuid I initially thought to add it in the same way that the v5 includes the DNS and URL namespaces. However the NIL uuid is categorically different and should really be included with all versions 1, 3, 4 & 5.
I considered centralizing the definition but the overhead of a require just for a static constant seemed a bit much.
If this implementation is alright, I'd like to update the docs with this PR.

Please let me know what you think.

@broofa
Copy link
Member

broofa commented Nov 22, 2017

Thanks for the suggestion. While I understand the case you're making, I don't think there's enough value in this to justify inclusion in this module. It's akin to the OID and X.500 namespace uuids... technically these are part of the spec but they're very rarely used in practice and, as such, not worth cluttering up the API. Especially since they're trivially easy to define ad-hoc for those few people who want them.

I'll even go so far as to suggest that the Nil UUID shouldn't be part of the spec, as it is redundant with (and inferior to) the native nil/null/None/NULL types that nearly all modern languages and data stores support.

@broofa broofa closed this Nov 22, 2017
@broofa broofa mentioned this pull request Jul 13, 2020
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