isKindOf: in Morphic code...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: isKindOf: in Morphic code...

Stéphane Rollandin
> We could, of course, implement a real protocol management & testing capability. At one time I thought that Traits might do that but they went moribund before ever really coming to life.

Yes, that is sad. We have always been missing the proper tools for
working with  Traits.


Stef

Reply | Threaded
Open this post in threaded view
|

Re: isKindOf: in Morphic code...

Stéphane Rollandin
In reply to this post by Eliot Miranda-2
> isKindOf: is simply lazy.

Agreed, but this can come in handy: a fast way to get things working
while they are not yet in shape. I program instinctively and refactor a
lot; I do use #isKindOf: at times when I do not yet know how the
eventual protocol will look like.

Stef

Reply | Threaded
Open this post in threaded view
|

Re: isKindOf: in Morphic code...

David T. Lewis
In reply to this post by Eliot Miranda-2
On Tue, Jul 05, 2016 at 11:21:23AM -0700, Eliot Miranda wrote:
>
> isKindOf: is simply lazy.  It's easy to implement the isFoo pattern, and it
> can be commented properly (for example, the comment can specify exactly
> which selectors the truth of the message implies).  isKindOf: is quick and
> dirty, but potentially ambiguous. Precisely what API are we expecting the
> receiver to exhibit?  Ugh.
>

I have no particular opinions on any of this, but I do want to mention that
Cuis has adopted an #is: Foo pattern, and if anyone is interested in making
changes in this area I would recommend taking a close look at Juan's work in
that area.

Dave
 

12