* Dave Mitchell <davem@iabyn.com> [2015-10-06T10:26:19] > So will when(1) always need to be written as when($_ == 1) now? > And if so, are when(1) and when($x) now equivalent to > > if (1) { ...; break } > if ($x) { ...; break } The goal state is that when(...){...} is directly equivalent to a smartmatch, with none of the utter madness now in evidence. when(1) was hotly debated for the sake of ==1, but in the end I said no, despite being briefly distracted by its shine. So, C<< when (1) { ... } >> should be an error. It could be compile-time, but runtime will do for now. C<< when($x) >> cannot be compile time, because $x could contain a valid value for the rhs of ~~. > I'm very confused! I hope this has disconfused you. -- rjbsThread Previous | Thread Next