4 ms·
I usually start with types. A signature saying I'm going from a pair of ints to one int doesn't say why I want to do that, I trust that the function name will,
by codebje 7y ago
I usually start with types. A signature saying I'm going from a pair of ints to one int doesn't say why I want to do that, I trust that the function name will, but it does help guide me to a function that's more likely correct than one without a type signature. More complex types offer more benefit, as they constrain the set of correct implementations further. Consider just the value of saying Int x Int -> Nat.
But mostly I like Haskell's type system for the high degree of confidence it gives me while refactoring. Type Tetris is a side benefit on that, IMO.