3 ms·
I don't understand how he can want static checking, but no warnings. "x is declared but never used" has saved me so many times. Maybe he's used to languages whe
by ced 14y ago
I don't understand how he can want static checking, but no warnings. "x is declared but never used" has saved me so many times. Maybe he's used to languages where warnings cannot be locally disabled? In Common Lisp I can (declare (ignore x)) to "shut up the compiler", and it works really well.
- michaelfairley 14y agoHe wants "x is declared but never used" to be an error that halts compilation. Go's philosophy on this[1] is "if it's worth complaining about, it's worth fixing in the code." 1: http://golang.org/doc/go_faq.html#unused_variables_and_imports http://golang.org/doc/go_faq.html#unused_variables_and_impor...