Top "Immutability" questions

Immutability is the inability to modify data after it has been created.

Which types are mutable and immutable in the Google Go Language?

In Google Go, I read that Strings are immutable, ok but are int's? What about other types? As a slightly …

go immutability mutability
Idiomatic way to update value in a Map based on previous value

Let's say I store bank accounts information in an immutable Map: val m = Map("Mark" -> 100, "Jonathan" -> 350, "…

scala map immutability
What is the different between @Immutable and @Entity(mutable=false) when using Hibernate

What is the difference between the two if any? Should one or both be used on an entity?

java hibernate jpa entity immutability
How can I create a new instance of ImmutableDictionary?

I would like to write something like this: var d = new ImmutableDictionary<string, int> { { "a", 1 }, { "b", 2 } }; (using ImmutableDictionary …

c# .net-4.5 immutability
What is the C++ equivalent of C#'s readonly field modifier?

Locking down state is great. In C# you can ensure that a field doesn't change it's value/reference once the …

c++ field immutability readonly
Idiomatic Way to declare C++ Immutable Classes

So I have some pretty extensive functional code where the main data type is immutable structs/classes. The way I …

c++ c++11 functional-programming immutability const-correctness
Immutable object pattern in C# - what do you think?

I have over the course of a few projects developed a pattern for creating immutable (readonly) objects and immutable object …

c# functional-programming design-patterns immutability
How to create an immutable list in Kotlin that is also an immutable list in Java?

I have a Java/Kotlin interop problem. A Kotlin immutable list is compiled into a normal java.util.ArrayList that …

java immutability kotlin immutablelist
Why are integers immutable in Python?

I understand the differences between mutable and immutable objects in Python. I have read many posts discussing the differences. However, …

python immutability mutable
Android mutable bitmap

Can someone please explain to me what a mutable bitmap is? What advantages/disadvantages or what limitations do mutable and …

android bitmap immutability mutable