3 ms·
It is a very minor point and could easily be removed from the article, but I had that realization while writing those samples and it stuck with me. I really th
by fasterthanlime 4y ago
It is a very minor point and could easily be removed from the article, but I had that realization while writing those samples and it stuck with me.
I really think that if we follow the "zero values by default" philosophy, it wouldn't be shocking for Go to accept omitting function arguments and just zero them.
The fact that it doesn't, and insists on you passing the right number of arguments, makes the point that you can't in fact, just afford to zero out everything that isn't explicitly specified.
- arccy 4y agothat's a trade-off with catching user errors, are you more likely to forget to pass an argument or need to pass a zero value?