develooper Front page | perl.perl6.language | Postings from July 2005

Quick OO .isa question

Thread Next
From:
Ingo Blechschmidt
Date:
July 11, 2005 06:18
Subject:
Quick OO .isa question
Message ID:
datrfo$rul$1@sea.gmane.org
Hi,

  class Foo {}
  class Bar is Foo {}

  Bar.new.isa(Object);    # true
  Bar.new.isa(Class);     # false
  Bar.new.isa(Foo);       # true
  Bar.new.isa(Bar);       # true
  # These are clear, I think.

  Bar.isa(Object);        # true
  Bar.isa(Class);         # true
  Bar.isa(Foo);           # ? (my guess: false)
  Bar.isa(Bar);           # ? (my guess: false)


--Ingo

-- 
Linux, the choice of a GNU | We are Pentium of Borg. Division is futile.
generation on a dual AMD   | You will be approximated.  
Athlon!                    | 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About