4 ms·
With inferred types you still know that callers must be passing something for which the operations performed are valid. Many languages allow you to specify typ
by benjiweber 12y ago
With inferred types you still know that callers must be passing something for which the operations performed are valid.
Many languages allow you to specify types even when they may be inferred to add clarity/preconditions. This is useful for modelling the domain as well as local reasoning. Perhaps the current implementation is valid for all integers, but in the domain context it only makes sense for the range 0-100.