Hi,

Larry Wall wrote:
> On Mon, Jul 11, 2005 at 09:46:30AM -0400, Stevan Little wrote:
> : On Jul 11, 2005, at 9:16 AM, Ingo Blechschmidt wrote:
> : >  Bar.isa(Object);        # true
> : >  Bar.isa(Class);         # true
> : >  Bar.isa(Foo);           # ? (my guess: false)
> : >  Bar.isa(Bar);           # ? (my guess: false)
> : 
> : I am not sure about this. I think that .isa as a class method should
> : behave much as it does for an instance method.
> 
> Right, or you can't easily decide whether Bar isa Foo in the abstract.
> You need to able to reason about the relationships of user-defined
> classes in the absence of instances.

ah, of course, that makes sense.

> So anyway, that gives us something like:
> 
>     Bar.isa(Foo);  # true
>     Bar.isa(Bar);  # true
>     Bar.isa(Class)  # false presuming Class is only a role
>     Bar.does(Class)  # true
>     Bar.does(CLASS)  # false
>     Bar.meta.isa(Foo); # false
>     Bar.meta.isa(Bar); # false
>     Bar.meta.does(Class) # false
>     Bar.meta.isa(CLASS) # false presuming CLASS is only a role
>     Bar.meta.does(CLASS) # true

These make perfect sense, too. And there's a clear distinction between
Bar and Bar.meta, so I'm absolutely fine with that :)


--Ingo

-- 
Linux, the choice of a GNU | When cryptography is outlawed, bayl bhgynjf
generation on a dual AMD   | jvyy unir cevinpl!  
Athlon!                    | 

Reply via email to