leves at elte.hu
Fri Feb 11 01:51:26 UTC 2011
On Fri, 11 Feb 2011, Igor Stasenko wrote:
> On 11 February 2011 02:28, David T. Lewis <lewis at mail.msen.com> wrote:
>> We had a good deal of discussion earlier about adding Object>>is:
>> with an inconclusive outcome:
>> Igor's original proposal is:
>> I have been tinkering around with Juan's SimpleMorphic in hopes of
>> getting it running in Squeak alongside MVC and Morphic, and it would
>> be convenient to have the default implementation of #is: in the image
>> so I don't have to put it in a package override.
> Just yesterday i had discussion about this with people in the lab. I
> can't say that i heard something new regarding this,
> and not saying that i'd like to resurrect the discussion.
> So, in short: there was no objection concerning getting rid of isXXX
> in favor of using #is: method.
What about performance?
> The only thing which still looks controversial is too simple default
> implementation which answers false.
> To my current opinion, Juan's variant is preferable. :) Yes. it should
> answer false and don't contain any extra logic , like trying to follow
> class hierarchy etc.
> Because it serves to replace isXXXX pattern, and not adding something
> new (i.e. more 'userful'). So, answering false for Object class fits
> well for this purpose.
> And of course solution to that problem is simple:
> - avoid writing code in style, which require isXXX tests and then
> branching. Nicely written code should use message dispatch instead.
> Too bad, we are not living in perfect world :)
Is it better to flood superclasses with no-op extension methods?
>> Any strong objections?
> Best regards,
> Igor Stasenko AKA sig.
More information about the Squeak-dev