re: Why learn... a statically typed language? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks for this interesting article! I just switched from PHP to Golang and I must admit that I feel a lot better now. In PHP, I used many linters...
 

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.

 

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. 😊

 

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

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

code of conduct - report abuse