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

Golang doesn’t have a proper generics support at its beginning. It is too late now.


You don't even need generics to avoid nullable pointers, you can special-case it as they special-cased slices, maps, channels, etc… e.g. `*int` -> non-nullable pointer to int; `?int` -> nullable pointer to int, and a tiny bit of flow analysis in nil checks so e.g. `if foo != nil` implicitly creates a new non-nullable version of `foo` inside the block body.




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

Search: