> On 21 Feb 2015, at 21:56, Darren Duncan <[email protected]> wrote:
> On 2015-02-21 2:45 AM, Moritz Lenz wrote:
>> On 21.02.2015 08:51, Darren Duncan wrote:
>>> I notice from looking at http://design.perl6.org/S02.html that Blob is
>>> listed
>>> both as being a role and as a type. See
>>> http://design.perl6.org/S02.html#Roles
>>> for an example of the former, and
>>> http://design.perl6.org/S02.html#Immutable_types for an example of the
>>> latter.
>>> -- Darren Duncan
>>
>> so, you think roles aren't types?
>>
>> (Also, roles auto-pun into classes upon usage).
>
> When I said type I meant class. As I recall from the rest of the spec,
> things were either roles or classes. You can't instantiate a role directly,
> so if a Blob is declared as a role you can't just instantiate one directly,
> isn't that how it works? Either way it seemed to be getting treated
> differently. -- Darren Duncan
$ 6 'role A {}; my $a = A.new; say $a'
A.new()
You *can* instantiate a Role directly. See above.
Liz