4 ms·
That's a strong vs. weak issue, not a static vs dynamic issue. irb(main):001:0> 1 + "hello" TypeError: String can't be coerced into Fixnum from (
by steveklabnik 13y ago
That's a strong vs. weak issue, not a static vs dynamic issue.
irb(main):001:0> 1 + "hello"
TypeError: String can't be coerced into Fixnum
from (irb):1:in `+'
from (irb):1
from /usr/bin/irb:12:in `<main>'
- lmm 13y agoStatic prevents type errors from propagating, which is particularly important when using generic functions. In ruby you can have a type error four functions back pass silently until you do something ungeneric with it, which makes debugging harder than it should be.