I think it is more an issue of design.

If your Invoice has a collection of "Items", you shouldn't manipulate
the collection directly and instead use accessor/operator methods.

I wouldn't restrict having the option of direct manipulation of the
collection, but it is a nice thing to have covered by some LINT rules.
:)


Regards,


Esteban A. Maringolo


2014-05-13 6:53 GMT-03:00 Yuriy Tymchuk <yuriy.tymc...@me.com>:
> 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

Reply via email to