1.

Why immutability is very important in software development?

Answer»

Immutability is a very important concept in software development. Immutable objects don’t change their state after construction. So they are very safe to USE as a shared object in a multi-threaded environment. They also reduce the parts of code which need explicit synchronization and LOCKS. This IMPROVES the overall performance of the system. Immutable objects HELP in writing pure functions or methods. There are no side effects in pure functions. That is why they make the whole application less bug-prone and easily TESTABLE.



Discussion

No Comment Found