proposal: void safety #20142
Closed
proposal: void safety #20142
Labels
Milestone
Comments
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
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.
The text was updated successfully, but these errors were encountered: