Immutability is the inability to modify data after it has been created. Modifications are instead made by copying the data. A property of immutable data is that it is *referentially transparent*.
3
votes
2answers
293 views
Immutable pure data classes with public setters on properties
I'm putting together some classes as a model for some information (that I'm currently pulling from a website).
The classes are implemented in C# - because in the current version of F# there are no ...
1
vote
2answers
112 views
Modify or not modify your objects when creating computing functions?
See the examples below:
function map_cloning(obj,fn){
result = {};
for (var key in obj)
result[key] = fn(obj[key]);
return result;
};
function map_modifying(obj,fn){
for (var ...
1
vote
2answers
215 views
Comments on my Java pattern for Mutable turned Immutable objects
Commenting omitted to give you the idea. I've been toying with this recently as a variant of the Builder pattern. I've recently fallen in love with immutable objects for the benefits they give in ...