All Questions
Tagged with dynamic-languages duck-typing
2 questions
5
votes
2
answers
2k
views
Does this code follow duck typing?
The principle of duck typing says that you shouldn't care what type of object you have - just whether or not you can do the required action with your object. For this reason the isinstance keyword is ...
23
votes
4
answers
2k
views
Why would many duck-typed dynamic programming languages use a class-based approach instead of prototype-based OOP?
Since quite many dynamic programming languages have the feature of duck typing, and they can also open up and modify class or instance methods at anytime (like Ruby and Python), then…
Question 1)
...