In reply to your message from the not too distant future: next Tuesday AD
Reply-to: [EMAIL PROTECTED]
Return-receipt-to: [EMAIL PROTECTED]
Organization: a) Discordia b) none c) what's that?
Content-Typo: gibberish, charset=ascii-art
Date: Tue, 22 Aug 2000 13:48:36 EDT
From: Jerrad Pierce <belg4mit>

>    $n = pop fn()
>you are just obfuscating writing 
>
>    $n = (fn())[-1];
yes

>It should not be done because it is wrong to lose compile-time
>type checking save under grave environmental stress, the likes
Why are you losing checking? It would seem right now keys

        would first check to make sure it'll be getting *something* OR die
        then to make sure that that something is a hash OR die

And all I said was replace the last OR die with:

        OR warn (if under strict&|-w) AND cast at run-time

If you gave it hash you short-circuit right out and have not lost any time.
If it in fact is not a hash, you may get warning under strict or -w.

>of which you are yet to demonstrate.  The burden of proof rests
>with you to show why to turn perl dumber.
This is *not* making it dumber, the only way it would make it dumber is if
you lost your test. But you don't have to lose your compile-time test...

>But that comes with similar attendant problems.  What then
>should
>    while ( ($k,$v) = each fn() ) {}
>do?  How often should fn() be called there?  And what if it
>returns a hash ref versus a list?  What about a list of one
>hash ref?  
It should be called once, otherwise you would loop indefinitely.
It should then pass every other value into $k and $v, while you iterate
over the contents. For example:

    while ( ($k,$v) = each fn() ){
        push @F, $k;
        push @G, $v;
    }

not being dissimilar from

    @F = fn();
    unzip(2, \@F)

>Comflating values with variables is not always sensible: consider
>4++, for example; this isn't (old) FORTRAN. :-)
Well that's a different issue, since that always evaluates to the same thing...

-- 
                                                  *             __    *      .
           \     |     /           .        . .           .  . ((_
               _____                       .                         .     .
          --  /     \  --           .        .      .   +    .   .     _/\
      oooooooooo.   |               * .       .   .           *       / ;M\_ .
   .oooooooooooo.oo.                  .  .    .       . /\    .      /  :IMM\
  ..oooooooooooo..oo.   Jerrad Pierce              /\  /  \         /   ;IIWMM
  ..oooooooooo.......   209 North Street     +    /  \ /  \  .     /   ;IIIIWM
  ...ooooooooo.......   Randolph, MA 02368        /  \     \  ___/   :;IIIIIWM
  ....ooo....o.......                            /    \    \ /  ::     ;;IIIMI
   .....ooo.........    http://www.pthbb.org     /    \     \   :     :::;IIIM
     ..ooooooo....      __________________________ ||   ||       ::.....::::::
MOTD on Prickle-Prickle, the 15th of Bureaucracy, in the YOLD 3166:

"God is too big for only one religion." -- A. Weysman

Reply via email to