Actually, a better implementation would be:

Object>>is: aClassOrSymbol
 ^ aClassOrSymbol asString = self class name asString

Like this you can even pass the class instead of its name (I presume that
printOn: will not change any time soon so we can rely on the fact that we
can polymorphically obtain the name of the class via asString).

Cheers,
Doru



On Sun, Jun 23, 2013 at 9:30 PM, Camillo Bruni <camillobr...@gmail.com>wrote:

>
> On 2013-06-23, at 21:25, Tudor Girba <tu...@tudorgirba.com> wrote:
>
> > If we want to have an Object>>is:, why not:
> >
> > Object>>is: aSymbol
> > ^ aSymbol = self class name
> >
> > ?
> >
> > Like this, I do not have to override it unless I need to rely on a
> > different mechanism.
>
> exactly, that is everybody's immediate reaction, except for the method's
> author ;)..
>



-- 
www.tudorgirba.com

"Every thing has its own flow"

Reply via email to