|
|
|
|
|
by nlitened
1296 days ago
|
|
I am not trying to argue, rather being curious. I've tried to look up what "pure functional" means exactly, and failed to find anything better than Wikipedia[0]: In computer programming, a pure function is a function that has the following properties:
1. the function return values are identical for identical arguments (no variation with local static variables, non-local variables, mutable reference arguments or input streams), and
2. the function has no side effects (no mutation of local static variables, non-local variables, mutable reference arguments or input/output streams).
I don't see how that excludes exceptions. I agree that exceptions kind of "feel" imperative rather than functional, but could you maybe help me find an accepted definition which excludes exceptions?[0] https://en.wikipedia.org/wiki/Pure_function |
|