3 ms·
Dynamic typing is polymorphism at the language level. In essence, you expect most operators to behave sensibly with different types. An expression such as "a +
by bluetomcat 3y ago
Dynamic typing is polymorphism at the language level. In essence, you expect most operators to behave sensibly with different types. An expression such as "a + b" resembles a polymorphic function such as "add(a, b)". You would expect it to work fine most of the time, regardless of the types. And the types in a dynamically-typed language usually aren't so many – you possibly have booleans, numbers, strings, lists, maps, sets and objects.
- Chabsff 3y agoThe moniker you are looking for is "duck-typing". Polymorphism is tightly tied to the notion of explicit interfaces.
- jwilliamson 3y agoHe's describing row polymorphism. Only some forms of polymorphism require explicit interfaces.