Hacker News new | past | comments | ask | show | jobs | submit login

This seems like a decent model for a lot of situations, but the difference between "development time" and "run time" gets increasingly blurry in the real world when you reload config live, do canary deployments of new code, etc. I think there's really just state with a spectrum of different lifetimes, from years to nano-seconds, and also cached/pure-functional data.



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?"


> 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. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: