Timeline for method to allow me ability to freely modify my classes, but make them immutable to others?
Current License: CC BY-SA 4.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 8, 2022 at 8:07 | history | edited | Glorfindel | CC BY-SA 4.0 |
broken link fixed, cf. https://meta.stackoverflow.com/a/406565/4751173
|
| Mar 10, 2014 at 17:32 | comment | added | supercat | The robustness of popsicle immunity may be enhanced by having all mutating methods and the "freeze" method confirm that they are on the same thread wherein the object was created, and possibly by having an object keep a "reference for mutation" which is used for all mutating actions. Such an approach would guard against the possibility of any mutations occurring after an object was supposedly "frozen". | |
| Mar 26, 2013 at 19:53 | history | answered | user7043 | CC BY-SA 3.0 |