An interesting read, though I still can't understand one thing.
Instead of modifying already existing objects, we decide to throw them away and create new ones. This is fine. How does it help us with avoiding bugs, or ease debugging? We still have to populate a new object, possibly with values coming from somewhere, possibly from previous objects. There still can be some nulls etc, we still can get errors, and we still can have a situation when a value was introduced deep in the execution tree. I know that I possibly have some misconception or I understand the topic poorly, so I would be glad if this could be elaborated :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
An interesting read, though I still can't understand one thing.
Instead of modifying already existing objects, we decide to throw them away and create new ones. This is fine. How does it help us with avoiding bugs, or ease debugging? We still have to populate a new object, possibly with values coming from somewhere, possibly from previous objects. There still can be some nulls etc, we still can get errors, and we still can have a situation when a value was introduced deep in the execution tree. I know that I possibly have some misconception or I understand the topic poorly, so I would be glad if this could be elaborated :)