Re: Types for Perl 6: request for comments

[email protected] (yary)
Newsgroups perl.perl6.language
Message-ID <CAG2CFAaW_6mTPJVduZuDjHNLT6ypG5HDDJOtvuXwB9KKiE3gQA@mail.gmail.com>
These two variations on Brent's work the same as the original- what subtle
differences happen by adding "anon" or "my" to the declarations?

my $sub_anon = do {
    anon proto foo (|) { * }
    multi foo (Int $x) { $x + 1 }
    multi foo (Str $y) { $y ~ 'a' }

    &foo;
}

my $sub_my = do {
    my proto foo (|) { * }
    my multi foo (Int $x) { $x + 1 }
    my multi foo (Str $y) { $y ~ 'a' }

    &foo;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.