News for hackers. Stuff that matters.
Re:Clear is better than clever [pdf] by b2gills on Monday May 13, 2019 @08:59PM (#19905754)
Perl6 has remedied the accidental leak of values to the caller by allowing you to give a return value in the signature.

This will ignore the last result and return Nil instead:

    sub foo ( $_ --> Nil ) {…}
This only works with literals, constants and Nil.

If you specify a type instead, it only enforces that the result is of that type.

There are no comments on this comment yet.