4 ms·
If we're using the more formal/traditional definition of "type safe" of "won't crash or go into an undefined state due to runtime type errors", then I think tha
by mumblemumble 3y ago
If we're using the more formal/traditional definition of "type safe" of "won't crash or go into an undefined state due to runtime type errors", then I think that it doesn't actually change the type safety situation at all.
Assuming we're actually using the more common colloquial meaning of "helps prevent logical errors due to a failure of the program's types to properly convey semantic distinctions" rather than the more I actually think it's kind of the opposite. When you curry a function that takes multiple arguments of the same type but treats them differently (so, not something like +), it gets easier to lose track of which is which in code that makes heavy use of partial application. Without partial application, someone reading the code is more likely to see that it's being called with two arguments of the same type and think to double-check the documentation if they're unsure which is which.