Re: S02 mistake re Blob?
Hi Darren, 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). Cheers, Moritz
Re: S02 mistake re Blob?
On Feb 21, 2015, at 2:45 AM, Moritz Lenz mor...@faui2k3.org wrote: Hi Darren, 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). Cheers, Moritz You gotta love a language that “auto-puns” things. :)
Re: S02 mistake re Blob?
On 2015-02-21 2:45 AM, Moritz Lenz wrote: Hi Darren, 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
Re: S02 mistake re Blob?
On 21 Feb 2015, at 21:56, Darren Duncan dar...@darrenduncan.net 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
S02 mistake re Blob?
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