The Set implementation requires the array to have a size > 0.
(Set basicNew initialize: 0) add: #x "Error Zero Devide"
From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] On Behalf Of
Sent: Thursday, December 1, 2016 3:42 PM
To: Pharo Development List <firstname.lastname@example.org>
Subject: Re: [Pharo-dev] Set internal array size
> Le 1 déc. 2016 à 15:04, Marcus Denker <marcus.den...@inria.fr> a écrit :
> The idea that a set is always created with a minimal size is because we
> always add at least some elements
not always. You know in some cases 80% of the time, your instances will have an
empty Set and with some values for the remaining 20%.
If you check in Moose, you should find a lot this pattern.