Although this is great information I primarily had 'less pure' languages' in mind when I asked.
Come to think of it, restricting mutable access to only the relevant objects as per function call using const seems to allow just this!
A function having only const input and output "should be" free of side effects (if no global mutables); while still being allowed to run all manner of unpure processes local to its own calling context.
Come to think of it, restricting mutable access to only the relevant objects as per function call using const seems to allow just this!
A function having only const input and output "should be" free of side effects (if no global mutables); while still being allowed to run all manner of unpure processes local to its own calling context.