Write Software, Well

September 22, 2022

Ruby is a Meritocracy

Think of static typing as an aristocracy. In a statically typed language, an object's family tree matters.

Statically typed languages are constantly asking about your parent or grandparent. If you're programming in Java, they'll ask about your aunts and uncles (think interfaces).

Dynamically typed languages, by contrast, are meritocracies: They are concerned with which methods you have rather than where those methods came from.

Dynamically typed languages don't care about an object's ancestry; instead, they simply say, "I don't care who you are related to. All I want to know is what you can do."

If it looks like a duck and quacks like a duck, then it is a duck.

End of story.

Donald Duck


Subscribe to get future posts via email (or grab the RSS feed)

Comments

No comments yet. Be the first to leave one.

Sign in to leave a comment.