Yes, mutation is bad as it gives rise to untraceable bugs that are sometimes hard to track. Yes, FP is more mathematical, easy to reason, parallel friendly.<p>But what about space. When dealing with large objects, functions have to copy them and process them and sometimes even produce large objects that are slightly modified than the input object. Doesn't this require lot of space?<p>Are we just wasting resources because memory is cheap now?
There is no need to copy them, you can just kind of "store the delta" and re-use the unchanged part. Checkout immutable / persistent data-structures, they are quite fascinating.
> functions have to copy them<p>I'm not an FP expert, but I understand that objects usually are immutable, which means functions don't change them, which means that there is no need to copy them. Even if there are changes, unchanged properties would point to the respective properties of the old object, minimising memory footpint.