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

Rust DOES have a null pointer value #290

Open
bugadani opened this issue Aug 11, 2020 · 3 comments
Open

Rust DOES have a null pointer value #290

bugadani opened this issue Aug 11, 2020 · 3 comments

Comments

@bugadani
Copy link
Contributor

Rust does not have `null`, but it is not ignorant of the importance of

Technically, there is std::ptr::null so this sentence is technically incorrect. Should we add a footnote expanding on this?

@Styro457
Copy link

Styro457 commented May 6, 2023

I personally think its better to leave it like that since it helps get the point across more easily. Its kinda the same way you teach some things in math, no need to overcomplicate the explanation for beginners.

@bugadani
Copy link
Contributor Author

bugadani commented May 6, 2023

I think if this hasn't been touched for 3 years, it probably won't, maybe because of the exact reason you stated :) Still, I would like to think that I was technically correct, even if that sort of pedantry isn't well placed in here. Though, to be fair, I did say a footnote1.

Footnotes

  1. like this

@ohhai
Copy link

ohhai commented Feb 29, 2024

This point is important at least for people with C/C++ experience. Main question would be difference between std::ptr::null and just zeroing the pointer.
In another words, if std::ptr::null is a special value (not equal to 0).

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

No branches or pull requests

3 participants