4 ms·
Referentially transparent functions naturally have immutable inputs and outputs, so that's implicit. But it's often useful to be able to write mutation-based al
by netbioserror 2y ago
Referentially transparent functions naturally have immutable inputs and outputs, so that's implicit. But it's often useful to be able to write mutation-based algorithms within a function, so in that context I'm less concerned, so long as the size and scope of the function is constrained.
- pmarreck 2y ago> But it's often useful to be able to write mutation-based algorithms within a function I know. Quicksort comes to mind. But you then lose a guarantee. Might not make a difference practically, though (which presumably is what Rust's design banks on).