3 ms·
A lot can be said with types beyond simply checking things like "is this a String or an Int?". Depending on the power of your type checker, you can say (with v
by the_af 10y ago
A lot can be said with types beyond simply checking things like "is this a String or an Int?".
Depending on the power of your type checker, you can say (with varying degrees of convenience) things like "this integer will always be positive", "this is always going to be a non-empty list", "these two functions can be composed", "I've exhausted all possible values for this variable; I know it because the compiler told me so", "it is safe to call this function, and I know it won't touch the database or do any kind of I/O", and many more.
Whenever you called a function and it wrote to a file when you didn't want that, that's also a type error!