|
|
|
|
|
by naasking
970 days ago
|
|
> Why? I wish a textbook tell me why, right there If you're a programmer, consider whether it's easier to reason about a function that always returns a value, or a function that sometimes returns a value and sometimes throws an exception. The latter is a partial function and typically complicates reasoning because of the exceptional cases, the former is a total function and is fairly trivial to reason about (like multiplication vs. division where you have to consider division by zero). Before complex numbers, the square root function was partial, but adding complex numbers made it total, so it simplified a lot of theory and enabled new types of analysis. Fortuitously, it also turned out to be very useful when applied to the real world. |
|