DEV Community

Discussion on: 5 reasons to use Golang

Collapse
 
curtisfenner profile image
Curtis Fenner

While Go is statically typed, I would not call it "strongly typed". It has one of the weakest type systems among popular statically typed languages.

It doesn't have real enums (you can merely name some integer values); it certainly doesn't have sum/tagged union types; it doesn't have generic/parameterized types or functions; its subtyping is only structural; everything can be null/freely "zero initialized".

These all eventually become impediments to designing obviously correct software that is verified by the typechecker.

Collapse
 
crabmusket profile image
Daniel Buckmaster

"Strong" and "weak" typing aren't very well-defined terms, but according to most of the definitions on this page Go should probably count on the strong side. Go doesn't allow many implicit conversions, doesn't treat pointers as integers, doesn't have untagged unions AFAIK, and performs most type-checking at compile time, though using interface{} and reflection you can mess around with it.