[Cuis-dev] SequenceableCollection>>checkedAt:
Juan Vuletich
juan at cuis.st
Sat Jul 8 06:42:34 PDT 2023
Hi Folks,
On 7/7/2023 12:26 PM, Gerald Klix via Cuis-dev wrote:
> 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
I agree that that #checkedAt doesn't make much sense, and it would be
best to remove it.
Mariano, can you change your senders to send #at: instead?
Gerald, thanks for spotting uses in external packages!
Cheers,
--
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