On Tue, Jul 31, 2001 at 11:51:48PM +0200, Abigail <[EMAIL PROTECTED]> wrote:
>     sub foo {
>         ....
>         EXPR;
>         return
>     }
> 
> and you are done. No "uglyness". All you needed to do is adding an

well, and then my neighbour comes and removes the "return;". in perl5,
"return;" at the end of a function is redundant unless you add such action
at a distance like with sort. Yes, you _can_ program weird functions
that do one thing in one context and totally difefrent things in another
context, but most just plain avoid it because it's not intuitive. PDL for
example has an inplace() function that marks operations as inplace, if
possible. (of course it's only an optimization issue).

> explicite return so there are no implicite returns giving you an
> unexpected context.

Remember that the discussion does not go about wether it is possible (we
all know it is) but wether it makes sense or makes programs easier. You
are just writing down what everybody already knows anyway.

(ok, not everybody, which adds to the problem).

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED]      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

Reply via email to