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

    What is Immutability? 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. …

  2. immutability - Immutablity in Java - Stack Overflow

    Immutability is a good quality for objects (especially those where ownership can be an issue, or concurrency is) but the downside is you may construct a lot of throwaway objects and …

  3. immutability - DeepReadonly Object Typescript - Stack Overflow

    interface ReadonlySetDeep<ItemType> extends ReadonlySet<DeepReadonly<ItemType>> {} DeepReadonly generic is a valuable tool that can help enforce immutability. I use the short DR …

  4. immutability - Java immutable-class rules - Stack Overflow

    Nov 4, 2015 · Immutability is often thought of in terms of "external characteristics". For instance, Java's String is documented to be immutable (that's what the Javadoc says).

  5. immutability - When to use mutable vs immutable classes in Scala ...

    Sep 30, 2013 · Much is written about the advantages of immutable state, but are there common cases in Scala where it makes sense to prefer mutable classes? (This is a Scala newbie …

  6. immutability - Immutable local 'variables' in C# - Stack Overflow

    Your title talks about immutable local variables, yet your question only mentions "something like this" (is that C++?) and "what I want" (what?). Can you explain what you want this code, or …

  7. immutability - Immutable list in C++ - Stack Overflow

    Oct 21, 2019 · How to make an immutable list in cpp? The list's reference should be constant as well as it's data. I don't to make a wrapper class over vector or any other container (I know that …

  8. Are tags: [mutability] and [immutability] the same?

    Apr 13, 2016 · I believe one reason immutability is used a lot more than mutability is that mutable state is the norm, while immutable is the peculiar thing. Hence people want to emphasize …

  9. immutability - Why string is called immutable in java? - Stack …

    Mar 4, 2013 · I understand that Immutable objects are objects that cannot be modified. But string can be modified when we use functions. So how do we say string are immutable? this was a …

  10. Why use immutable Vector or String in Rust - Stack Overflow

    Dec 10, 2021 · I'm learning Rust and learned, that for making an expandable string or array, the String and Vec structs are used. And to modify a String or Vec, the corresponding variable …