[squeak-dev] Towards a more consistent and sensible implementation of #isAbstract
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Fri Dec 8 08:54:06 UTC 2017
I had the same question.
The case I had in mind when using = was:
ArrayedCollection copy isAbstract.
No reason that it would not be abstract right?
Since = is inherited from Object and uses ==, it does not make a great
difference currently...
Nevertheless, I let = for not insulting the future.
But if one wants to use == everywhere, I have no serious objection.
2017-12-08 7:15 GMT+01:00 H. Hirzel <hannes.hirzel at gmail.com>:
> This looks like a useful cleanup
>
> Many cases are like this
>
> ArrayedCollection
> isAbstract
> ^self = ArrayedCollection
>
>
> So
>
> isAbstract
> ^self == ArrayedCollection
>
>
> is a better solution
>
> --Hannes
>
> On 12/7/17, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> > Hi, there.
> >
> > What are your thoughts on how to implement "MyClass class >>
> #isAbstract"? I
> > think that one should always use #== and compare it to an actual class
> > object like this:
> >
> > MyClass class >> #isAbstract
> > ^ self == MyClass
> >
> > At the time of writing, we have various attempts in your image. You can
> > browse them easily:
> >
> >
> > Best,
> > Marcel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171208/6e694c96/attachment.html>
More information about the Squeak-dev
mailing list
|