|
|
|
|
|
by b3n
1460 days ago
|
|
> The function will generally only work on a subset of types for given variable. This is true for many functions defined in statically typed languages too. Just because your function says it works with an integer, doesn't mean it's necessarily going to work with _any_ integer (think `1/n`). Very often the type used isn't narrow enough. Modern dynamic languages understand this, see for example Clojure's spec[1]. [1] https://clojure.org/about/spec |
|