I understand that scala supports immutability and so when we if we have two integer vals and we do val1 + val2, so it will create a new integer which will have the value as val1 + val2.
My question is that because scala creates new instances of objects to not to mutate the previous object, what are the performance and memory drawbacks of immutability?
Edit: I want details specific to scala about how it deals with the performance and memory overheads.