re: What Do You Think About Immutable Data? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Robert "Uncle Bob" Martin discussed three programming paradigms in his book, Clean Architecture. SP (Sturectured Programming) OOP (Object-oriente...
 

Thanks for the awesome comment. I really enjoyed it as a whole but I will highlight a few parts for further discussion if you don't mind.

"to keep our state in consistent state"

This is a bit vague for me. How is mutable state inconsistent?

"All race/deadlock conditions, concurrent update problems go away"

This is true for multi-threaded languages but I don't think this is an issue in case of (the mostly single-threaded) JavaScript.

"also provide other benefits such as memoization, time travel, etc"

I totally agree with this one, immutable updates really shine here.

PS: Thanks for the link to the book.

 

Thanks for the feedback, Miklos.

This is a bit vague for me. How is mutable state inconsistent?

What I meant was variables don't change thus wherever you access that variable, it's always the same (consistent).
Maybe it came out wrong 😅

code of conduct - report abuse