On Fri, May 02, 2008 at 11:15:34AM -0700, chromatic wrote: : On Friday 02 May 2008 07:08:21 John M. Dlugosz wrote: : : > TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: : : > > Then, since classes are open, the programmer can easily say : > > : > > CGI does CGI::Simple; : > : > That would be : > : > class CGI is also { does CGI::Simple } : > : > and means that CGI::Simple is a role, meant to serve as an interface : > specification. It's not, it is a whole class that works on its own. : : All classes imply the existence of a role of the same name.
If a role is derived from a class, it must of necessity be a snapshot of the class, because roles are immutable, while classes are not. The only interesting question in my mind is whether you can take another snapshot and override the previous one somehow, or whether such derived roles should version themselves so that the snapshots can be distinguished by longname. Alternately, we make one snapshot when a class is first composed, and refuse to make any other snapshots for that name regardless of how the class under that name changes. Larry