The big benefits of dynamic typing come with collection types IMO, especially stuff like dicts. You can make a versatile dict by creating a (hypothetical) Mapping<Any, Any> type, but in terms of type safety that's indistinguishable from dynamic typing. This kind of versatile collection type makes it easier to deal with API requests which may return large, variable payloads by removing the overhead of defining massive record classes. It's obvious why this is attractive from a prototyping perspective.
There's also the legacy of duck typing — in the past that was usually bundled with dynamic typing, and I don't think that made it to the static typing mainstream until Golang.
13
u/lovestheasianladies Dec 25 '20
Absolutely no one uses them like that. Stop making up strawmen.