Is using “out” or “ref” parameters in Java methods to return extra values bad?
I happened to create a mutable class like this:
Immutable vs mutable object as returned parameter for class method [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. There is a class method (static method) in […]
subclass of immutable object not immutable, can this work?
So I’m finishing up refactoring some code to remove a number of previously-mutable objects and add a better generic processing for all the classes in the domain. Just as I thought I was finishing I eralized that there is one sub-class that has some additional state.
Mutable cursor in readonly object?
I’ve been searching for the different uses of the keyword mutable
. I’ve found that it is generally used for caching, lazy computing, mutex, …
Mutable cursor in readonly object?
I’ve been searching for the different uses of the keyword mutable
. I’ve found that it is generally used for caching, lazy computing, mutex, …
Mutable cursor in readonly object?
I’ve been searching for the different uses of the keyword mutable
. I’ve found that it is generally used for caching, lazy computing, mutex, …
Is immutability very worthwhile when there is no concurrency?
It seems that thread-safety is always/often mentioned as the main benefit of using immutable types and especially collections.
Is immutability very worthwhile when there is no concurrency?
It seems that thread-safety is always/often mentioned as the main benefit of using immutable types and especially collections.
How to refactor my project to have less mutable objects? [duplicate]
This question already has answers here: How does one decide if a data object type should be designed to be immutable? (9 answers) Closed 9 years ago. There seems to be a trend towards immutable objects, and functional programming. I recently got aware about the benefits of immutability. However, I am not very familiar with […]
Addition or deletion of elements of a dynamic array
Is there any consensus among programmers (or a common convention) on the “right way” to deal with the addition or deletion of one or more elements of a dynamic (mutable) array at runtime while gracefully handling changes to the references to the other elements?