99 ms·
You're correct. Go doesn't leave it entirely to discipline, since unused (or unhandled) variables are a compiler error. You can silence that error with _, but i
by shanemhansen 12y ago
You're correct. Go doesn't leave it entirely to discipline, since unused (or unhandled) variables are a compiler error. You can silence that error with _, but it sticks out to the eye as broken code.
However I'm not trying to argue that go gives you the same type safety guarantees that rust does, it doesn't.
- codygman 12y agoThanks, I forgot about the warnings. It's been a while since I've used Go.
- voidlogic 12y agoIts not a warning, its a "will not compile" :)
- dllthomas 12y agoIsn't the technical term "error"?
- voidlogic 12y agoI suppose the technical term would be "fatal error". I was just clarifying it was a warning since C compilers, for example, will happily spit out many warnings and then hand you binary-
- dllthomas 12y agoYeah, it's a worthwhile clarification. Of course, the distinction is less hard than it might be, given that a lot of us build with -Werror.