|
|
|
|
|
by Clex
3284 days ago
|
|
Go has also an amazing static-analysis tool, vet, that is not mentioned in the article: https://golang.org/cmd/vet/ It can find printf-format errors, invalid shifts, unreachable code, etc. Even though go vet is very helpful, it is sometimes scary that the compiler allows to build such incorrect code. For instance: https://play.golang.org/p/2AVHUt5Wcf |
|
Go does already have one of the strictest compilers (by default) out there. But it is pretty typical for a great many language frameworks to support optional additional strictness. Eg "use strict" in Perl or the gcc flags of which I cannot recall off hand. I see God's vet as akin to those. ie there when you need it but keeps out of your way when you just need to get some prototyping done.