On 09/02/06, Mike Guy <[EMAIL PROTECTED]> wrote: > Robin Houston <[EMAIL PROTECTED]> wrote > > Any Code() simple closure truth match if $b->() (ignoring $a) > > I obviously missed that when it went past on p5p. Surely that should > read > > Any Code() predicate(value) match if $b->($a) > > meaning that $a satisfies the predicate implemented by the code $b? > > Ignoring $a seems a completely stupid thing to do.
IIRC, that rule exists so you can create when-clauses that don't involve the current topic, without having to explicitly throw it away. This is useful when using given/when to replace a sequence of elsifs, when not all of them use $_. The problem, as I see it, is that you can't really have all three of the following: 1) Sensible (symmetric, non-ignoring) behaviour of `~~` 2) Simple correspondence between `when` and `~~` 3) Sensible (dwimmy) behaviour of `when` Currently, it's (1) that's been lost. Now, personally I wouldn't mind exchanging it for (2), but there certainly are valid reasons for wanting to keep (2). Stuart