Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Go doesn't have null-safety, so it seems more like a nice-to-have based on Go's success.


I dunno, we had a terrible experience with Go nils at my current job:

- It's super-easy to create a situation where some some obscure code fragment can cause a panic and crash the whole app due to nil pointer access, especially in multithreaded scenarios

- We had to start using linters to track possible nil errors early on

- Eventually we just moved to Kotlin, where this is not an issue

- And don't get me started on nil interfaces, good luck properly checking nilability and tracking these kind of issues


An other fun one is that methods may or may not receive nils depending whether they’re defined with a value or a pointer receiver.


I mean all of those things are downsides to having unsafe nullability. However, my point was that those things obviously aren't deal breakers for many, many people as Go is still extremely popular.


Please don't make new accounts to reply to a single comment.




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

Search: