immutability
When to use value and reference types for immutable types? (.NET)
With mutable types, the difference in behaviour between value and reference types is clear: // Mutable value type[详细]
2023-03-05 11:04 分类:问答How to convert immutable Seq to mutable seq with until loop
I\'m trying to return a mutable Sequence with an until loop, but i have an immutable seq in return of (0 until nbGenomes) :[详细]
2023-03-04 20:52 分类:问答Mutable vs immutable object for instance variable in objective C
I have a class with a property sampleNames. It is of type NSSet. The instance variable I plan to use will be NSMutableSet.[详细]
2023-03-01 15:10 分类:问答Caching strategy for small immutable objects in Java?
I am developing an app that creates a large number of small, immutable Java objects. An example might be:[详细]
2023-02-28 11:30 分类:问答Is there a bidirectional multimap persistent data structure?
In other words, can we model many to many relationships in a persistent data structure efficiently? A pair of unidirectional multimaps was suggested. However, I\'m not sure how this would work well[详细]
2023-02-25 18:50 分类:问答How to initialize and "modify" a cyclic persistent data structure in Scala?
I have searched and found some info on this topic but the answers are either confusing or not applicable.[详细]
2023-02-25 17:10 分类:问答Which of these are immutable in Python?
I am trying to figure out whether the following are immutable in Sage (which is built on Python so I believe if it is immutable in python, I believe in most cases it will be immutable in Sage)[详细]
2023-02-24 06:25 分类:问答java: advantages of immutable objects in examples [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a[详细]
2023-02-24 04:37 分类:问答What's the difference between Collections.unmodifiableSet() and ImmutableSet of Guava?
JavaDoc of ImmutableSet says: Unlike Collections.unmodifiableSet, which is a view of a separate collection that can still change, an instance of this class contains its own private data and will ne[详细]
2023-02-23 16:33 分类:问答Do purely functional languages really guarantee immutability?
In a purely functional language, couldn\'t one still define an \"assignment\" operator, say, \"<-\", such that the command, say, \"i <- 3\", instead of directly assigning the immutable variable[详细]
2023-02-23 13:44 分类:问答