Immutability and immutable js
12
Immutability and immutableJS Marcelo Cure
-
Upload
marcelo-cure -
Category
Internet
-
view
103 -
download
2
Transcript of Immutability and immutable js
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