On 2014-03-19, 1:20 AM, Moritz Lenz wrote:
On 03/19/2014 12:45 AM, Darren Duncan wrote:
Damian, Moritz, etc,
It seems to me that the basic problem here is that the vertical bar |
has 2 different meanings (outside rules) depending on context.
When used with type names it produces a union type, while with normal
values such as integer literals it produces a junction value.
No. It's always a Junction. Perl 6 has no union types.
Really? All this time I thought in Perl 6 you could write say:
my Int|Str $foo;
Or otherwise say Int|Str anywhere a type name could go, and then this is saying
you accept anything that is a Int or a Str but nothing else there.
Was that never true or was it replaced by something while I wasn't looking?
-- Darren Duncan