3 ms·
Go doesn't have inheritance and that makes things quite a bit easier; there's an obvious way to deserialize a map to a struct type. You can see the seams in th
by skybrian 13y ago
Go doesn't have inheritance and that makes things quite a bit easier; there's an obvious way to deserialize a map to a struct type.
You can see the seams in the limited support for interfaces; basically there's no way to deserialize to non-empty interface type. (How would that work?)
In Dart, since any class can be extended or used as an interface type, the issues are similar to interface types in Go. There's no bare struct type.
There might be an interesting compromise, but it's not a trivial design problem.