develooper Front page | perl.perl6.language | Postings from February 2001

Re: assign to magic name-of-function variable instead of "return"

Thread Previous | Thread Next
From:
Glenn Linderman
Date:
February 5, 2001 13:12
Subject:
Re: assign to magic name-of-function variable instead of "return"
Message ID:
3A7F1938.85485ED2@Linderman.com
Damian Conway wrote:

> Actually, I do agree that Perl 6 ought to provide a universal "destructor"
> mechanism on *any* block. For historical reasons, I suppose it should be
> C<continue>, though I would much prefer a more generic name, such as
> C<cleanup>.

Both of the exception handling RFCs discuss an "always" block that is
equivalent to a universal destructor mechanism on any block.

Cleanup is a nice word, but maybe sometimes you want to do something that
doesn't really fit the connotation of cleaning up.  Whereas "always" just says
when it is done.

    return ( $stuff, $morestuff, $whatever )  always close F;

--
Glenn
=====
Even if you're on the right track,
you'll get run over if you just sit there.
                       -- Will Rogers
----- Stuff below this added by NetZero -----



Shop online without a credit card
http://www.rocketcash.com
RocketCash, a NetZero subsidiary

Thread Previous | 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