Internal Mutation of Persistent Data Structures
To clarify, when I mean use the terms persistent and immutable on a data structure, I mean that:
Does immutability entirely eliminate the need for locks in multi-processor programming?
Part 1 Clearly Immutability minimizes the need for locks in multi-processor programming, but does it eliminate that need, or are there instances where immutability alone is not enough? It seems to me that you can only defer processing and encapsulate state so long before most programs have to actually DO something (update a data store, […]
Immutable Method in Java
In Java, there is the final
keyword in lieu of the const
keyword in C and C++.
Are immutable/stateless singletons bad?
Lately there have been some kind of revolution against singletons, but is there something wrong with them if they are stateless?
Why were Java collections implemented with “optional methods” in the interface?
During my first implementation extending the Java collection framework, I was quite surprised to see that the collection interface contains methods declared as optional. The implementer is expected to throw UnsupportedOperationExceptions if unsupported. This immediately struck me as a poor API design choice.
How to increase the efficiency of an Immutable Queue in java?
I have been developing an Immutable queue in java, but the version I have developed is supposedly slow and I have been suggested to create a faster version of the same and I have no idea as to how to accomplish that.
Do not declare interfaces for immutable objects
Do not declare interfaces for immutable objects
When and why would we use immutable pointees?
In Java, the String
object is both immutable and also a pointee (aka reference type). I’m sure there are other types/objects which are both immutable and a pointee as well and that this extends further than just Java.
method to allow me ability to freely modify my classes, but make them immutable to others?
I am creating the model part of an MVC architecture. My one class will provide all the accesses to allow one to fetch system state. I want most of this state to be immutable as it shouldn’t be changed and I don’t want anyone accessing my model to be able to break the state by making a foolish change.
When is it inappropriate to make objects immutable?
I have a class which represents an entity object in our system (for sake of argument, a Customer object)