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

>Checking the value of a property after you've nil'ed the parent object is enough raise an exception in most languages.

Only you're not doing that here. If anything, it's the inverse.

>But regardless of the bad design of Go around the usage of "nil", the code would have failed in pretty much any other language anyway.

In other languages the interface can be null as a value even if the interface has a not-null type.




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

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

Search: