immutability and immutable js
TRANSCRIPT
Why is immutability good?
● no state changing● easier to test● avoid bugs● safe refactoring● leads to better design
Great powers ...
allocates many objects in memory instead of changing existing ones
...comes with great responsibility
Immutability and FP
● In FP you should only use immutable stuff● Many languages accept mutation● Hybrid languages accept mutation