[Cuis-dev] [DEFECT] #copyFrom:count: for OrderedCollections

Juan Vuletich juan at cuis.st
Tue Feb 6 12:01:54 PST 2024


On 2/6/2024 2:30 PM, Luciano Notarfrancesco via Cuis-dev wrote:
> Fantastic thread. I’ve been strugling with this myself since a few 
> days ago with the fix that used sizeOf: because it broke my code (no 
> big deal, I expect this to happen sometimes).
>
> I did some experiments and I ended up defining the message copyEmpty: 
> (perhaps copyBlank: would be better name, because in Smalltalk 
> collections empty means size=0) on the instance side instead of 
> ofSize: on the class side. The reason for this is that sometimes on 
> the class side you dont have all the information necessary to make a 
> new blank collection compatible with the receiver. For example see 
> Text>>grownTo:, we shouldnt need that method. In my arrays for math i 
> have thr same problem, i need to do it on the instance side.

That makes sense in many cases!

>
> Just wanted to add something to the discussion…
> Cheers,
> Luciano
>
>

Thanks

-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich



More information about the Cuis-dev mailing list