3 ms·
> Are you suggesting that data should be stored in global variables instead? According to FP, data shouldnt be stored where possible and yes, if you can, store
by throwawayqqq11 3y ago
> Are you suggesting that data should be stored in global variables instead?
According to FP, data shouldnt be stored where possible and yes, if you can, store global or top level immutable blobs and pass by reference.
> That's how the real world is.
Well, maybe not. I dont rememer where it came to me that OOP is like classical physics, where everything has to get passed around with the speed of light and FP is like quantum physics, stateless until you do the computation. I dont know how accurate this analogy is but it still fascinates me since modelling reality is enlarge what programming is.