Hacker News new | past | comments | ask | show | jobs | submit login

Lots of zeros is good.

One big problem with null pointers is that there's only one of them. (One of a given type doesn't help.)

Hoare's "NULL was my biggest mistake" rant proposed the wrong solution, namely no null.




I think it would be better if Go had nilptr for pointer types and "nil" only applied to interface types. That would fix the problem of "why did I return nilptr but the value != nil?" But Go should also have a named zero value that applies everywhere, or at least an operator like ? that compares anything to zero.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: