develooper Front page | perl.perl6.language | Postings from June 2001

RE: Multiple classifications of an object

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
June 27, 2001 10:48
Subject:
RE: Multiple classifications of an object
Message ID:
5.1.0.14.0.20010627133754.020edda8@24.8.96.48
At 09:57 AM 6/27/2001 -0700, David Whipp wrote:
>When I started this thread, I knew everyone would tell me that
>delegation is the answer: I included the note that I knew about
>that, but I guess the bias against MI is just too strong.

Well, not *everyone* is against it. :) And the current @ISA stuff is MI, 
albeit on a per-class basis rather than on a per-object one.

Anyway, as Damian mentioned, setting the .ISA property is a perfectly 
reasonable sort of thing to do if the language supports this. From an 
internals standpoint I'd ask that some serious thought as to the cost vs. 
benefit relation is given. This will have one of the following possible 
effects:

* Objects are bigger since they all need an .ISA property, if we toss the 
per-class @ISA
* Method lookup is slower and more complex, since we need to check for both 
a per-object and per-class ISA lookup
* We suck up more memory building fake classes (containing just an @ISA) 
for you behind the scenes

None of the possibilities are show-stoppers, of course--it's just a matter 
of which cost we want to pay for this.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | 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