2 ms·
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 pr
by Twisol 7y ago
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.
- brundolf 7y agoYes- 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?"
- andrewflnr 7y ago> A piece of data categorized this way must come with a "Relative to what?" This would be a good caveat to add to the original post. :)