Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

immutability

Name: Anonymous 2011-12-29 20:17

Is there a benefit to immutable data structures like in Clojure and erlang? What does it do for you versus just not mutating mutable objects?

Name: Anonymous 2011-12-29 20:30

They share structure. If you have a huge structure and you need a new version of it with just one changed value, without a structure-sharing data structure you'd need to copy the whole thing. Imagine your structure being 1MB and needing to be updated 1000 times a second, and you'll get it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List