[squeak-dev] The Inbox: Tools-ct.950.mcz

tim Rowledge tim at rowledge.org
Mon Feb 24 20:55:34 UTC 2020



> On 2020-02-24, at 12:30 PM, Jakob Reschke <forums.jakob at resfarm.de> wrote:
> 
> Am Mo., 24. Feb. 2020 um 20:55 Uhr schrieb <commits at source.squeak.org>:
>> 
>> -       (method isKindOf: CompiledMethod)
> ...
>> + wantsClassListDrop: anObject
>> +
>> +       ^ anObject isKindOf: CompiledMethod!
>> 
> 
> Better use isCompiledMethod, since it is already there.

Also worth noting that #isKindOf: is rarely a good choice since
a) it is fairly slow
b) it is looking only at a specific class hierarchy

a) is just annoying when you find it in a loop in a loop in a critical part of code. b) is quite often a design mistake found when somebody is still thinking 'types' and not 'protocols'.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"E=Mc^5...nahhh...E=Mc^4...nahh...E=Mc^3...ah, the hell with it."




More information about the Squeak-dev mailing list