3 ms·
I don't believe go can have uninitialized values. every variable has a default "zero value"
by compsciphd 7y ago
I don't believe go can have uninitialized values. every variable has a default "zero value"
- aykevl 7y agoNot on the heap, but it can certainly have uninitialized variables on the stack. These cannot be created in normal Go code but the optimizer may decide to leave some values uninitialized when it determines that this is safe to do.