3 ms·
Those impedance mismatches are equally present in dynamically typed code. The only thing types do is help make it obvious when there are problems with compositi
by whateveracct 9y ago
Those impedance mismatches are equally present in dynamically typed code. The only thing types do is help make it obvious when there are problems with composition.
I work in Haskell with many other Haskell developers and a wide variety of Haskell mindsets. It’s a very complex type system we use a lot of, and so far, the issues you mention are so minor and worth it.
- grosjona 9y agoWith dynamically languages, the type of an object is not important so you don't need to explicitly typecast external objects to fit into your logic. With dynamically typed languages, if two different objects expose the same functions then you can use them in the same way. The behavior of an object is all that counts.
- wtetzner 9y agoYou seem to be talking about nominal types being a problem. Structural subtyping and row types are two ways of getting the benefits you're talking about while still being statically typed.
- mannykannot 9y agoIf two different objects expose the same functions then you can call them in the same way. You have no way of knowing, from the function names and arity, whether their semantics are what you need. Once you start asking that question, you are asking the sort of questions that using types helps answer.