Dynamically typed vs statically typed
# Example 1
def order(user, shipping_method, cart)
# ...
end
Tell Don't Ask
# Example 2
unless book.digital?
book.ship(user)
end
Dynamically typed vs statically typed
# Example 1
def order(user, shipping_method, cart)
# ...
end
Tell Don't Ask
# Example 2
unless book.digital?
book.ship(user)
end