[Cuis-dev] SequenceableCollection>>checkedAt:

Gerald Klix cuis.01 at klix.ch
Fri Jul 7 08:26:12 PDT 2023


On 7/7/23 1:45 PM, Luciano Notarfrancesco via Cuis-dev wrote:
> Take a look at SequenceableCollection>>checkedAt: and senders. I have no
> idea why that method is there, and it’s old. Is there any
> SequenceableCollection that doesn’t check bounds or does something weird
> like wrap around? I can’t make sense of it, I think we should remove this
> method and change the senders to just use #at:…
> 
> 
If you check the method's senders, you will recognized
that it just provides a "nicer" error message for
SequenceableCollection>>#second, #third ... .
I suppose the idea to avoid a subscript out bounds
error for e.g. `#(a b c) fifth`.

#first however checks for an empty collection.

IHMO we can replace all occurrences of #checkedAt:
with #at:.

A quick recursive grep reveals that erudite uses #checkedAt:.


HTH,

Gerald


More information about the Cuis-dev mailing list