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

xx and closures

Thread Next
Luke Palmer
March 28, 2005 05:54
xx and closures
Message ID:
We were discussing on #perl6, and thought that the feature:

    sub foo () {
        say "Blech";
    { foo() } xx 5;

Would be useful.  Since it is dwimmery, and you wouldn't want the
closure to execute if you didn't know it was there, we decided that it
would probably be best if this were distinct from:

    my $closure = { foo() };
    $closure xx 5;

Does the convenience (and obviousness when reading) enough to warrant
adding a special case in this situation?


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About