Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Week 7 homework for Chris Montes #110

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

mandelbro
Copy link

No description provided.

3. When would you use DuckTypeing? How would you use it to improve your code?

Ducktyping is useful in dynamic typed languages, where objects are defined by their purpose rather than their type. I would use it to make my functions more robust, i.e., better able to handle a wide array of inputs, more simple, one or two lines of code rather than complicated if/else or switch statements, and to take advantage of making my class more efficient and easy to use by allowing users to pass, say, entire loaded objects OR numeric or string identifies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants