Right — any batch professing program can be thought of as a pure function of its inputs, but internally it is likely to be constructed as a series of smaller programs. The constants of a lower-level program are the mutable and cached state of the higher level program, frozen for the duration of execution. And the subprograms may themselves instantiate and operate over locally-scoped mutable state.
It’s a good model, and I think gets a lot of things right. But there are definitely nuances.
Yes- there's a certain amount of relativism to it. A function that's externally pure may have its own internal State, just like an entire program that's externally pure may have its own internal state. A piece of data categorized this way must come with a "Relative to what?"
It’s a good model, and I think gets a lot of things right. But there are definitely nuances.