develooper Front page | perl.perl6.language | Postings from June 2006

Re: ~~ with *

Thread Previous | Thread Next
June 19, 2006 07:51
Re: ~~ with *
Message ID:
On 6/16/06, Larry Wall <> wrote:
>     given $bool {
>         when False {...}
>         when True {...}
>     }

   Just my two cents, but whenever i see "when True {...}" I expect $_
to be true, so that i can do when True and when False.  And I if see
when followed by a comparison i expect the when to be true when the
comparison is true.  To me its kind of like, if you only have one
operand then use the given subject, if you have two operands then they
don't need a subject.  So the given $_ topic would fill in only in the
cases where you needed a topic.  Of course that might not realy make
since for given/when and its smart matching magic.  But then maybe we
just don't want to be able to say "when $a == $b" and thats just
invalid since it would be clearer written as an if.

Eric Hodges

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About