> On 03 Apr 2015, at 14:11, Benoit St-Jean via Pharo-dev 
> <[email protected]> wrote:
> 
> 2) Am I the only one annoyed by the fact that the Collection class still 
> holds on to 2 class variables (one of them being an instance of Random, the 
> other a mutex) for the sole purpose of accommodating the #atRandom & 
> #atRandom: methods ?  Even worse, the Integer class' implementation of 
> #atRandom references the Collection class to use that random instance!  In 
> other words, Integer>>#atRandom --> Collection>>#randomForPicking --> Random 
> !  I've always been a fan of the "mind your own business" approach.  Wouldn't 
> it make a lot more sense to have the Random class provide a default instance 
> (a singleton) whenever other classes need such an object instead of crippling 
> the code with class variables and singleton instance all over the place?

This always annoyed me big time. Not just for what you said, but also because 
the access protection should not be there at all.


Reply via email to