Golang and Rust both offer type safety, but Golang is statically typed and uses a garbage collector to manage memory (as mentioned earlier).
Why would they word it that way? Is Rust any less statically typed than Go?
Golang and Rust both offer type safety, but Golang is statically typed and uses a garbage collector to manage memory (as mentioned earlier).
Why would they word it that way? Is Rust any less statically typed than Go?
Golang (and java) by nature has a bad type system that's fundamentally incompatible with popular data structures used in the web.
Json a very popular web data structure cannot be represented properly as a type in golang.
The standard way of dealing with a dynamic json data structure in golang is to resort to interfaces and type assertions or assuming it's some struct. There is a similar problem in java. This isn't some "wrong" thing in go as you wrongly state. It's standard practice. You are suppose to use interfaces for this purpose in go. It's standard and by design. If you haven't then you haven't worked on something sufficiently big enough such that the input parameters include json of an unknown structure. Basically you only worked in web apps where inputs aren't complex like trees which is a valid structure that can be represented in json.
Rust gets around this by something called sum types allowing you to stay type safe without ever resorting to breaking out of the type system when dealing with any json type. Typed python also has sum types which let's you easily get around this problem.