Hacker News new | past | comments | ask | show | jobs | submit login

Immutability is an excellent tool to manage mutability. It lets you make guarantees about what won't change, which allows for some really great optimisations - like safe cross-thread reads without locks.

I agree it's not right for everything, but there are a lot of operations that can be modelled with immutable data, such as most server-side web code - reads definitely, and a lot of the write operations don't actually need to mutate objects though most ORMs and other DB APIs do require this.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: