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

RE: Roles and Mix-ins?

Thread Previous | Thread Next
Jonathan Lang
January 6, 2004 20:58
RE: Roles and Mix-ins?
Message ID:
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

Jonathan "Dataweaver" Lang

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About