develooper Front page | perl.perl6.language | Postings from July 2005

Strange interaction between pairs and named binding

Thread Next
From:
Autrijus Tang
Date:
July 18, 2005 05:42
Subject:
Strange interaction between pairs and named binding
Message ID:
20050718124224.GA84092@aut.dyndns.org
This currently works in Pugs:

    for [1..10].pairs -> Pair $x { say $x.value }

But this does not:

    for [1..10].pairs -> $x { say $x.value }

Because the ruling that pairs must not be bound to parameters that are
not explicitly declared to handle them.  Is this a desirable behaviour?

Thanks,
/Autrijus/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About