RS
> Plan for failure, not success
> Go programmers thinks about the failure case first. We solve the “what if… ” case first. This leads to programs where failures are handled at the point of writing, rather than the point they occur in production.
в таком случае я честно говоря не понимаю почему указатели и особенно интерфейсы в Go могут быть
nil
😄ведь…
func Write(w io.Writer) {
_, _ = w.Write([]byte(“success”))
}
это как раз тaки the point they occur in production в случае если
w == nil // true
Я конечно понимаю что речь о trade-off’е лаконичности кода и его безопасности, но всё-же..