Re:Proposal: Go should have generics
by sythe2o0 on Thursday April 14, 2016 @02:08PM
(#11499078)
In my own experience, nil basically only shows up when I've failed to initialize something (like forgetting to loop over and make each channel in an array of channels), or when returning a nil error to indicate a function succeeded. I've never run into other interfaces being nil, but I also haven't worked with reflection and have relatively little Go experience (~6 months).
The code that I've written regularly uses interfaces and pointers, but I'd guess 80% works directly with values.
The code that I've written regularly uses interfaces and pointers, but I'd guess 80% works directly with values.