The chapter 17 of TRPL book talks about static/dyn dispatch using trait and duck typing. From what I understand duck typing does not need any nominal types.
Wikipedia for duck typing has the following example for duck typing.
class Duck: def swim(self): print("Duck swimming") def fly(self): print("Duck flying") class Whale: def swim(self): print("Whale swimming") for animal in (Duck(), Whale()): animal.swim() animal.fly()
But in case of trait the rust compiler needs the concrete types to use a specific Trait type (by name) to do either static or dynamic binding. Given that how do we say Rust supports duck typing?
What did I miss?