DEV Community

Discussion on: Why learn... a statically typed language?

Collapse
 
rhymes profile image
rhymes

In PHP, I used many linters and unit tests to ensure the quality of my code whereas in Go it's just built-in.

That's a bit of a trap, you should still write tests, but you don't need to guard against types most of the time, that's for sure. Go still has the interface{} escape route so you might have to do some type checking at runtime once in a while.

You can setup linters as well, with golangci-lint for example.

Collapse
 
biros profile image
Boris Jamot ✊ /

When I said that the tools are built-in, I meant it's part of the SDK. I was not saying it's automatic or whatever. 😊

Collapse
 
bwhitelaw24 profile image
Ben W

what are the advantages of using golangci-lint over go lint and go vet?

Thread Thread
 
rhymes profile image
rhymes

They are both included in golangci-lint. It packs multiple linters for different aspects, check out the Readme in the link