The Set implementation requires the array to have a size > 0.

(Set basicNew initialize: 0) add: #x "Error Zero Devide"

Best regards,

-----Original Message-----
From: Pharo-dev [] On Behalf Of 
Christophe Demarey
Sent: Thursday, December 1, 2016 3:42 PM
To: Pharo Development List <>
Subject: Re: [Pharo-dev] Set internal array size

> Le 1 déc. 2016 à 15:04, Marcus Denker <> 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.

Reply via email to