On 9/11/05, Stevan Little <[EMAIL PROTECTED]> wrote:
> Hello all.
> 
> I have some questions about how Roles will behave in certain
> instances, and when/where/what $?ROLE should be bound too.
> 
> 1) Given this example, where 'bar' is a method stub (no implementation)
> 
> role Foo {
>      method bar { ... }
> }
> 
> Should the eventually implemented method still have a binding for $?
> ROLE?

The way you're referring to $?ROLE here sounds kind of akin to asking
*the* type (not class) of a particular object.  That is, you're asking
the compiler for the answer to a question that doesn't make any sense.

> 4) If a Role has a method stub, you are in effect creating a contract
> with any class which consumes that Role. The class must implement
> that method. However, what happens if the class consumes another Role
> which implements that method. Do they still conflict? or does the
> second Role's version fufill the first Role's contract?

The second role fulfill's the first role's contract.  Definitely. 
There's a school of design based precisely on this notion (see Modern
C++ Design and do s/<.*?>//g).

Luke

Reply via email to