Hacker News new | ask | show | jobs
by mharig 1260 days ago
You seem to not understand duck typing.

Functional tests will test the correct types, too.

Edit: If you need an object that swims and quacks, you don't need to care if it is a rubber duck or an animal.