About 1,510,000 results
Open links in new tab
  1. What is immutability and why should I worry about it?

    Immutability is applied primarily to objects (strings, arrays, a custom Animal class) Typically, if there is an immutable version of a class, a mutable version is also available. For instance, …

  2. Pros. / Cons. of Immutability vs. Mutability - Stack Overflow

    Dec 7, 2009 · Immutability has, for example, benefits in muti-threaded programs. As immutable objects cannot change their state after construction, you can safe share them across any …

  3. oop - Mutable vs immutable objects - Stack Overflow

    Nov 2, 2018 · One of the finer points in the debate over mutable vs. immutable objects is the possibility of extending the concept of immutability to collections. An immutable object is an …

  4. Why do immutable objects enable functional programming?

    Aug 31, 2012 · Now exactly the same story goes about "immutability" as well, if objects are not immutable, a function with the same object as its input may have different results (aka side …

  5. java - What is meant by immutable? - Stack Overflow

    Nov 11, 2008 · What is necessary is not that the fields be immutable, but rather that the object's defined observable state be immutable; an object which holds a reference to another object as …

  6. immutability - Why would one declare an immutable class final in …

    Jan 26, 2017 · Immutability also affects more than just a single method — it affects the entire instance — but this isn't really much different than the way equals and hashCode in Java …

  7. immutability - What is the difference between stateless and …

    Jan 26, 2017 · I often hear the term "Stateless" and "Immutable". For example, HTTP is a stateless protocol, and a String object is an immutable object. But I have a hard time grasping …

  8. immutability - What does "immutable variable" mean in functional ...

    I'm new to functional programming, and I don't understand the concept of immutability; e.g. an immutable variable. For example, in Standard ML (SML): val a = 3 val a = a + 1 The second …

  9. immutability - Java Mutable and Immutable concepts - Stack …

    Aug 12, 2016 · @EJoshuaS The literature is unfortunately wildly inconsistent when it comes to defining an "immutable object," but often the term only refers to "shallow" immutability (all of …

  10. immutability - Which of these are immutable in Python? - Stack …

    Apr 14, 2011 · Immutability is an important concept, since knowing that an object's value can't change lets you make certain assumptions about it (for example, dict effectively requires …