On Mon, 2005-03-07 at 19:40 -0800, Larry Wall wrote:

> On Mon, Mar 07, 2005 at 05:56:12PM -0800, David Storrs wrote:

> : Actually, I guess they would have to be...can you apply a role to a
> : bare type?
> : 
> :      my int does SelectOutputFile;  # I would expect this to fail 
> :      my Int does SelectOutputFile;  # I would expect this to work

> The latter always works.  The former can probably be made to work in
> the case of roles that only add methods and don't change the storage
> representation, since the vtable is associated with the class and
> not the object.

I could make the argument that it should be possible to decorate an
object with a role.  If that means generating a new anonymous class just
to have a vtable to munge, so be it.

-- c

Reply via email to