5 ms·
Up until quite recently, golang lacked generics, so `interface{}` was passed everywhere. It does not have typesafe enums (you can pass integers and it will comp
by za3faran 1mo ago
Up until quite recently, golang lacked generics, so `interface{}` was passed everywhere. It does not have typesafe enums (you can pass integers and it will compile). It has no way of declaring immutable structures. It does not have pattern matching.
- Mawr 1mo ago> It does not have typesafe enums (you can pass integers and it will compile). sigh. Sure, if you literally pass an untyped, hard-coded integer, like so: foo(100) then, and only then will it compile. However, this won't: a := 100 foo(a) How horrific.