Top "Immutability" questions

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

Mutable vs immutable objects

I'm trying to get my head around mutable vs immutable objects. Using mutable objects gets a lot of bad press (…

oop immutability mutable
How to create immutable objects in Java?

How to create immutable objects in Java? Which objects should be called immutable? If I have class with all static …

java immutability
What would a "frozen dict" be?

A frozen set is a frozenset. A frozen list could be a tuple. What would a frozen dict be? An …

python dictionary data-structures immutability
How to make an immutable object in Python?

Although I have never needed this, it just struck me that making an immutable object in Python could be slightly …

python python-3.x immutability
Immutable/Mutable Collections in Swift

I was referring to Apple's Swift programming guide for understanding creation of Mutable/ immutable objects(Array, Dictionary, Sets, Data) in …

ios objective-c swift immutability mutable
Remove a property in an object immutably

I am using Redux. In my reducer I'm trying to remove a property from an object like this: const state = { …

javascript immutability redux
Why are mutable structs “evil”?

Following the discussions here on SO I already read several times the remark that mutable structs are “evil” (like in …

c# struct immutability mutable
Ruby: What does the comment "frozen_string_literal: true" do?

This is the rspec binstub in my project directory. #!/usr/bin/env ruby begin load File.expand_path("../spring", __FILE__) …

ruby string immutability ruby-2.3
Immutable vs Unmodifiable collection

From the Collections Framework Overview: Collections that do not support modification operations (such as add, remove and clear) are referred …

java collections immutability
Remove value from object without mutation

What's a good and short way to remove a value from an object at a specific key without mutating the …

javascript immutability