In article <[EMAIL PROTECTED]>, Larry Wall

> :    given( $foo ) {
> :       when(  ( scalar @array and scalar %hash ) ~~ $_) ) { ... }
> :       }

> which is exactly what I would expect from Perl 5, unless when is
> really a very intelligent macro of some sort.  As far as I know
> Perl 5's when has no clue how to distribute a smartmatch.

Well, I don't think you'd expect that based on perlsyn, so it looks
like the docs need to change to match what it does. I think the idea in
P5 is seriously borken.

> To write what you want there, you'd need something like:
>     when any(@array) & any(%hash.keys)  {...}

It's not that I want that, but I'm trying to figure out what happens
with the logical operators based on the P5 docs. I'm starting from the
syntax rules and finding out what I can do with them rather than
starting with a task and looking for a way to do it. My interest is how
I'm going to answer questions in front of a bunch of students who use
the rules in unexpected ways.

So, this isn't a Perl 6 issue, and I'll relay to the P5 folks that they
aren't even close, have no hope of being close, and that they'll have
to figure it out on their own. :)

Reply via email to