[Pdx-pm] the quest for return_if

Michael R. Wolf MichaelRWolf at att.net
Wed Jun 27 04:47:22 PDT 2007

> vaule_of_function = function();
> return value_of_function if defined value_of_function;

This refactors to "non-magic"[1] Perl[2]:

    return $rc if defined($rc = function());

Is there anyone on this list working on Perl6 continuations?  Any comment on
the proposed return_if "flow control"?  Is it more like an exception or more
like spaghetti?

  1. for the definition of "non-magic" that includes folks knowing that
assignment returns a value

  2. something to consider for the folks who have to maintain the code when
you get hit by a bus (or another job offer)

Michael R. Wolf
    All mammals learn by playing!
        MichaelRWolf at att.net

More information about the Pdx-pm-list mailing list