Open cqcallaw opened 8 years ago
Pure functions should not reference their surrounding contexts in any way. I'm inclined to be hard line about it and also disallow closing over surrounding contexts by value
They should be able to use / make reference to constants in their surrounding context, including other pure functions.
Hmmm, so you're advocating for functions that are statefully pure but referentially impure? That is, pure functions can't necessarily be copy/pasted into another scope or file?
(from a verbal discussion) disallowing references to other pure functions makes it a pain in the rear to compose functions together into another pure function.
It seems useful to flag functions without side effects as "pure"