develooper Front page | perl.perl6.language | Postings from January 2004

RE: Roles and Mix-ins?

Thread Previous | Thread Next
From:
Jonathan Lang
Date:
January 6, 2004 20:58
Subject:
RE: Roles and Mix-ins?
Message ID:
20040107045830.87206.qmail@web40809.mail.yahoo.com
Austin Hastings wrote:
> There's two ways to look at that. One way is to say: "I'm going to
> define an interface as being this OTHER thing minus a method." That 
> seems like a positive construction, and supporting it might be 
> desirable.
> 
> The other way is to say: "Nobody knows what methods call what other
> methods in their implementation (nor should we know). Therefore, 
> removing methods is forbidden. If you have a conflict of methods, alias 
> them and provide support in the knowledge that any component C<role> 
> that requires the method may call it internally."

Or you could say that when you "exclude" a method, what you're really
doing is hiding it from everything external to where it's declared, while
leaving it available to be called internally.  Method exclusion would be
more like declaring a private method in C++ than actually removing it from
the class or role.  This means that a method wouldn't be provided to a
class that C<does> its role but excludes it itself, and thus it wouldn't
be used to satisfy the requirements of any other roles that the class
C<does>.  

=====
Jonathan "Dataweaver" Lang

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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