3 ms·
> I hate that forgetting to initialize all fields of a struct does not lead to an error, but will just fill in "zero-values" for those fields. This has bitten m
by silisili 2y ago
> I hate that forgetting to initialize all fields of a struct does not lead to an error, but will just fill in "zero-values" for those fields. This has bitten me many times, and zero-values are almost never the behavior I want.
There's a linter for this you can easily integrate into your build or CI. Personally, having worked at a place with that as a CI rule, I'm the opposite. I felt annoyed having to explicitly set things I purposely didn't set. So I think it living as an optional linter is probably the right place.
> I've found Golang's generics to be confusing and unexpressive.
Same. Also with iterators.