This article was originally published on bmf-tech.com.
Overview
A summary of duck typing
What is Duck Typing
- In dynamically typed object-oriented programming languages, what an object can do is determined by the object itself.
- An object that has all the methods of an interface can be considered to implement the interface, even if it does not explicitly implement it.
- If it walks like a duck and quacks like a duck, it must be a duck.
Top comments (0)