top | item 42375795

(no title)

steinuil | 1 year ago

Types give you much more than just getting an error early when you call the wrong method on an object or pass a string where you needed a number.

Once you have written down the shape of the data flowing through your program in a way that a compiler can check you'll be able to reason about the whole program better and you might find issues much faster.

I think that types can directly help a lot with logic errors as well: one of the things people say most often when discussing typed programming language is that you can make illegal states unrepresentable, which means that you can encode logic into the type system itself.

discuss

order

archerx|1 year ago

That might be interesting, I'll check for some examples.