but I have 103 send of methodDict in my image
Yes, I am slowly removing them, but that takes time (I removed quite a lot over the last months! A *lot*!)
Ok excellent I did not know that.
I even added a lint rule detecting calls to #methodDict.
So I do not get it and personally I would not deprecate methodDictionary and I would remove methodDict because it sucks!
methodDict should *never* be used from the outside. Itâs far too easy to get problems because you modify the dictionary without e.g. invalidating the VM cache or telling the system.
And it gets *much* easier to read:
methodDict values â> methods methodDict keys â> selectors methodDict size > 0 â> #hasMethods and so on⦠itâs amazing how much more readable code gets.
So why do we provide a âniceâ selector âmethodDictionaryâ if this is a private accessor for internal state? If we do that it communicates âuse meâ! And you should not. If you want to use it, you know what you are doing and you know #methodDict.
I disagree here. In that case we should start using vv jyv jvzxxx. We should put the method in a private category and we should add a comment.
And if people use it, the #methodDict is so deep in the brain of people that they never used #methoDictionary (there where maybe 5 sendersâ¦).
Still I would rename it. Stef