4 ms·
IMO, Go is never a good example in static vs dynamic type system discussions (I mean, for this case: parametric polymorphism has been around since the 70s...).
by dahauns 6y ago
IMO, Go is never a good example in static vs dynamic type system discussions (I mean, for this case: parametric polymorphism has been around since the 70s...).
The language developers themselves have repeatedly stated that its type system being very limited is intentional.
See e.g. here:
https://github.com/golang/go/issues/29649#issuecomment-454820179 https://github.com/golang/go/issues/29649#issuecomment-45482...
TBH, sometimes I wonder why they bothered with static typing at all...
- simiones 6y agoSure, I know Go is a low blow to static typing. But in this particular regard, Java or C# don't fare much better either. This is not a question of just supporting parametric polymorphism, but of abstracting over the number of arguments of a function, which is not supported in almost any type system I know of; and then of matching the number of arguments received with the type of function you specified initially.