Top "Immutability" questions

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

Is there a corresponding immutable enumMap in guava?

I recently learnt about the benefits of EnumMap in Java and would like to replace the existing ImmutableMap<OccupancyType, …

java immutability guava enum-map
Why are strings immutable in many programming languages?

Possible Duplicate: Why can't strings be mutable in Java and .NET? Why .NET String is immutable? Several languages have chosen …

java c++ string immutability
val-mutable versus var-immutable in Scala

Are there any guidelines in Scala on when to use val with a mutable collection versus using var with an …

scala collections functional-programming immutability
Does (or will) C# include features for side-effects verification?

I know C# is getting a lot of parallel programming support, but AFAIK there is still no constructs for side-effects …

c# .net f# parallel-processing immutability
Scala immutable map, when to go mutable?

My present use case is pretty trivial, either mutable or immutable Map will do the trick. Have a method that …

scala map immutability mutable use-case
Convert immutable Bitmap file to mutable Bitmap

A: Bitmap immutableBmp= BitmapFactory.decodeResource(getApplicationContext().getResources(),R.drawable.sample); mutableBitmap=immutableBmp.copy(Bitmap.Config.ARGB_8888, true); B: Bitmap immutableBmp= …

android bitmap immutability mutable
Immutable Type: public final fields vs. getter

I need a small Container-Class for storing some Strings which should be immutable. As String itself is an immutable type, …

java immutability
How to convert a mutable HashMap into an immutable equivalent in Scala?

Inside a function of mine I construct a result set by filling a new mutable HashMap with data (if there …

scala immutability scala-collections mutable
General-purpose databases that never delete or update data in-place

I'm very much inspired by the approach to data management advocated by Rich Hickey, and implemented in Datomic, where the …

database immutability survey database-versioning datomic
Are strings in Ruby mutable?

Consider the following code: $ irb > s = "asd" > s.object_id # prints 2171223360 > s[0] = ?z # s is now "zsd" &…

ruby string immutability mutable