4 ms·
Generics is only part of the issue. Go has a crippled type system. Json in go cannot be represented as a type and also is not type safe. This is 100 percent be
by crimsonalucard 7y ago
Generics is only part of the issue. Go has a crippled type system.
Json in go cannot be represented as a type and also is not type safe. This is 100 percent because go is missing a basic type primitive.
Json contrary to what many people think is not untyped. Json is represented by a recursive sum type which go has no ability to represent.
I think what caused this issue is more because the designers of go are more systems people rather than language theorists.
- jstimpfle 7y ago> Json in go cannot be represented as a type and also is not type safe. Not a Go programmer, but why don't you simply use an explicit type tag and a number of getters? They can assert that they're not called in invalid situations.