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

proposal: void safety #20142

henryas opened this issue Apr 27, 2017 · 1 comment

proposal: void safety #20142

henryas opened this issue Apr 27, 2017 · 1 comment


Copy link

henryas commented Apr 27, 2017


I wonder about the possibility of introducing void safety in Go. When you call obj.Method() or dereference *obj, the compiler makes a guarantee that obj is not null, or else it will not compile. At the moment, in Go 1.8, the problem won't be detected until runtime. In a more complex situation, the issue may escape detection until the software is run in the production environment. Tony Hoare calls this a billion dollars mistake.

I am not a programming language expert, but I think this is worth implementing and it may potentially prevent many bugs.

@gopherbot gopherbot added this to the Proposal milestone Apr 27, 2017
Copy link

bradfitz commented Apr 27, 2017

Thanks for the suggestion but the Go 1.x language is frozen at this stage. I'm going to close this but rest assured that the language folk are well aware of the issues here and it will remain under consideration for any future language update.

@golang golang locked and limited conversation to collaborators Apr 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

3 participants