News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by bluetomcat on Wednesday October 04, 2023 @09:28AM (#37764821)
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.
Re:Strong typing, a hill I'm willing to die on by Chabsff on Wednesday October 04, 2023 @09:45AM (#37765097)
The moniker you are looking for is "duck-typing". Polymorphism is tightly tied to the notion of explicit interfaces.
Re:Strong typing, a hill I'm willing to die on by jwilliamson on Wednesday October 04, 2023 @10:54AM (#37766060)
He's describing row polymorphism. Only some forms of polymorphism require explicit interfaces.