> From: Luke Palmer <[EMAIL PROTECTED]>
>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.

I do not see $?ROLE as refering to the type of the object, I would think we 
should use 
does() for that. I see $?ROLE as being like $?SELF and $?CLASS in that it is 
just a 
pseudo-lexical which is only bound in certain situtions (inside a method 
defintion, 
inside a class definition, etc). It seems to me that $?ROLE should be bound 
within a Role 
defintion as well, and this of course means it is defined within role methods 
as well. 
However, method stubs are a grey area. The stub is defined within the Role, and 
so a 
part of the Role, but the eventual method defintion is done by the consuming 
class, 
which is not part of the Role. 

Honestly, my vote is for no. I think $?ROLE only really makes sense within the 
context of 
the Role, and I am not really sure I see much use for it outside of this anyway.

Stevan


Reply via email to