3 ms·
I agree, it does sometimes feel that everyone is taking crazy pills. Why did everyone start caring about mutability all of a sudden? I really like MobX ATM. It
by RealDinosaur 8y ago
I agree, it does sometimes feel that everyone is taking crazy pills. Why did everyone start caring about mutability all of a sudden?
I really like MobX ATM. It's a lot easier to explain to new people as well. Redux is like... too much...
- legulere 8y agoPeople started caring about mutability out of two reasons I would say: - It’s a source of thread-safety bugs. With multiple cores even in phones and async programming rising this has become a bigger issue. - It’s a source of general program logic bugs. I wouldn’t say that it has come all of a sudden. Like other modern techniques it has been standard in functional programming for years. In mainstream programming languages it’s also not totally new, for instance immutable strings were a design decision in java.
- invaliduser 8y agoYou are so right for the thread-safety, immutability is a major improvements. However, I am pretty sure OP was referring to immutability in javascript, which is single-thread by design, and yet many javascript developers use immutability like a no-brainer and is seen as best-practice to the point where people don't even remember what it solves. Just that it must be used.