Why is default zero initialisation useful #5962
Unanswered
KeAiMianYang
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I mainly come from higher level, garbage collected languages, not from C. So I am not talking compared to initialised behaviour in C.
Even after reading about ZII and making the zero value useful, I do not understand in practice why this is valuable — especially for nil pointers where it seem to me that the ability to represent non-nillable pointers is more valuable.
What kind of patterns or code examples can I check to see the point of ZII?
Partially related, how painful is the absence of non-nillable pointer in practice? Coming from Java and C# I cannot imagine being fine without the ability to represent them.
Beta Was this translation helpful? Give feedback.
All reactions