Open pavel-krivanek opened 1 year ago
I kind of agree with this. It also happens with other objects where #at: makes no sense.
There is the same problem with #size, #basicAt:.
This also bothers me when doing TDD
It is ugly we should fix it, also they pollute Object a lot. Maybe we can add a trait or a superclass having them or for classes in the core to add the implementation in the variable classes. There are only 48 variable classes. From them:
On Mon, Jun 26, 2023 at 9:04 AM Guille Polito @.***> wrote:
I kind of agree with this. It also happens with other objects where #at: makes no sense.
at: is up in the hierarchy just as a convenience. Like that, people
implementing new [byte/word]array subclasses do not need to define #at:.
There is the same problem with #size, #basicAt:.
This also bothers me when doing TDD
— Reply to this email directly, view it on GitHub https://github.com/pharo-project/pharo/issues/14120#issuecomment-1606832915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWY7574NFOTNLEKCL2TUDXNEX7FANCNFSM6AAAAAAZTWICBQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Pablo Tesone. @.***
Yes cleaning this would be great. I wonder why at: is not at the minimum in Collection.
Bug description If we evaluate a message like
nil at: 'aString'
, it, instead ofMessageNotUnderstood
, raisesError: only integers should be used as indices
because it tries to call the primitive, which is more confusing than it should be. Maybe some otherObject
primitives should be checked as well.