I wouldn't call Go's typing "very weak". It's not Haskell, but it's still a fairly typical manifestly-typed language like C# or Java (minus contra- and/or covariance), and you certainly can't just slop values around without thinking about their type. "Very weak" I'd reserve for Perl, Javascript, or (I think) PHP, with their propensity to turn "anything" into a string or a number out from underneath you.
It is generally stronger than C's, in that C lets you be quite... creative... in how you cast values. Go qua Go does not let you do that, though it does have an escape hatch via the unsafe package that lets you do anything C can, mostly used for interfacing with C.
Comments
I wouldn't call Go's typing "very weak". It's not Haskell, but it's still a fairly typical manifestly-typed language like C# or Java (minus contra- and/or covariance), and you certainly can't just slop values around without thinking about their type. "Very weak" I'd reserve for Perl, Javascript, or (I think) PHP, with their propensity to turn "anything" into a string or a number out from underneath you.
It is generally stronger than C's, in that C lets you be quite... creative... in how you cast values. Go qua Go does not let you do that, though it does have an escape hatch via the unsafe package that lets you do anything C can, mostly used for interfacing with C.
Go does indeed add some nice checks over C. For example, given:
It's an error to write: That's enough typing to prevent many types of annoying mistakes.