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

Sure, allowing struct initialization without explicitly setting fields is a foot gun. Ideally Go wouldn’t assign meaning to zero values and instead require each field to be explicitly initialized a la Rust. This is one of the things Go got wrong and Rust got right.


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

Search: