Undeclared routine: break used at line ...

2017-06-13 Thread Gabor Szabo
I just managed to write while True { ... break if $code eq 'exit'; ... } I wonder if Rakudo could be more cleaver in this particular case and remind me to use 'last' instead of 'break'. Gabor

Re: Undeclared routine: break used at line ...

2017-06-13 Thread Elizabeth Mattijsen
> On 13 Jun 2017, at 19:34, Gabor Szabo wrote: > > I just managed to write > > while True { >... >break if $code eq 'exit'; >... > } > > > I wonder if Rakudo could be more cleaver in this particular case and > remind me to use 'last' instead of 'break'. Is the undeclared sub erro

Re: Undeclared routine: break used at line ...

2017-06-13 Thread Gabor Szabo
On Tue, Jun 13, 2017 at 8:50 PM, Elizabeth Mattijsen wrote: > >> On 13 Jun 2017, at 19:34, Gabor Szabo wrote: >> >> I just managed to write >> >> while True { >>... >>break if $code eq 'exit'; >>... >> } >> >> >> I wonder if Rakudo could be more cleaver in this particular case and >>

Re: Undeclared routine: break used at line ...

2017-06-13 Thread Elizabeth Mattijsen
comes from a language where 'break' is the > keyword, this would be very surprising > and an telling that person it is called 'last' in Perl 6 would be a nice > touch. After https://github.com/rakudo/rakudo/commit/69b1b6c808 you get: $ 6 'break' ===SORRY!=== Err

Re: Undeclared routine: break used at line ...

2017-06-13 Thread Gabor Szabo
of 'break'. >>> Is the undeclared sub error not helpful enough? >> I think for someone who comes from a language where 'break' is the >> keyword, this would be very surprising >> and an telling that person it is called 'last' in Perl 6 wou