[Cuis-dev] SequenceableCollection>>checkedAt:

Luciano Notarfrancesco luchiano at gmail.com
Fri Jul 7 08:45:08 PDT 2023


Yes, in my opinion they should all use at: without doing any checks, and
let at: fail.

On Fri, 7 Jul 2023 at 17:26 Gerald Klix <cuis.01 at klix.ch> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230707/6c02fb28/attachment.htm>


More information about the Cuis-dev mailing list