Allen Madsen
class WrappedThing
def run
CalledThing.call
end
end
class CalledThing
def call
:return_value
end
end
allow_any_instance_of(CalledThing).to receive(:call).and_return(:return_value)
WrappingThing.run()
class WrappedThing
def run
CalledThing.cal
end
end
def contact(customer: User): Unit = {
send_email(customer.email)
}
# vs
def contact(customer) = {
send_email(customer.email)
}
Static typing can lead to compile time performance optimizations. Though, this largely doesn't apply to languages that compile to javascript.
User user = new User;
let foo = Option<Rc<Vec<u32>>>
All Programs
Correct programs
Typed programs