I got an interest some years ago, to see if Context-Oriented-Programming would help to have immutable collections. Apparently, Java supports immutability at runtime (i.e., there is no class ImmutableArrayList as far as I know). So, there is no good design for immutable collections as far as I know. I read something about that on Doug Lea web page. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 13, 2014, at 5:53 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi,
sorry if there was already this question, but I couldnât find it anywhere.
Iâm looking in the OO-design concerns and it seams that Java guys are crazy about returning the collection that is used for state of an objects. The only acceptable option is returning it in the immutable wrapper. As far as I know, pharo does not have immutable collections (except from intervals and symbols). Are we missing something important, or there is a philosophy behind the building blocks we have now, and the design we come up while using them.
Cheers. Uko