On Thu, 25 May 2017 05:35:42 -0700, alex.jakime...@gmail.com wrote:
> Code:
> say 02
> 
> Result:
> Potential difficulties:
>     Leading 0 does not indicate octal in Perl 6. Please use 0o2 if you
> mean that.
>     at -e:1
>     ------> say 02⏏<EOL>
> 2
> 
> 
> To see the problem with this error message, let's see this task from
> thinkperl6 book:
> 
> 3. In math notation, leading zeros are OK, as in 02. What happens if
> you try this in Perl?
> 
> 
> Indeed, sometimes you'd think that leading zeros should do nothing. In
> fact, I remember myself writing numbers with leading zeros a couple of
> times, and I remember zero times I actually needed something in octal.
> 
> Is there any way we can improve the error message so that it includes
> this situation as well (i.e. using leading zeros to mean nothing)?
> Please also consider that 6 year old kids may not know what octal is,
> but the error message should be understandable anyway.


Thank you for the report. This is now fixed.

Fix: https://github.com/rakudo/rakudo/commit/b6694bd0b3
Tests: none

Reply via email to