Re: Checking for nil return

2020-12-28 Thread Brad Gilbert
Nil and not its Failure descendents? > > This example under https://docs.raku.org/type/Nil shows what I think is a > less-than-awesome specification, and I am curious about the reasoning > behind it being defined as valid > > sub a( --> Int:D ) { return Nil } > > > > -

Re: Checking for nil return

2020-12-20 Thread Brad Gilbert
Nil is always a valid return value regardless of any check. This is because it is the base of all failures. On Sat, Dec 19, 2020, 8:17 PM yary wrote: > Is this a known issue, or my misunderstanding? > > > subset non-Nil where * !=== Nil; > (non-Nil) > > sub out-check($out) returns non-Nil {

Re: "temp" vs "my"

2018-10-03 Thread Brad Gilbert
Note that OUTER::<$v> only goes up one level. So to go up two levels OUTER::OUTER::<$v> There is also OUTERS::<$v> which will go up as many levels as it needs to find the variable { my $a = 1; my $b = 2; { my $a = 3; { say

Re: $? and $! equivalents

2018-09-14 Thread Brad Gilbert
On Fri, Sep 14, 2018 at 5:08 PM Parrot Raiser <1parr...@gmail.com> wrote: > > This is probably going to be a forehead-slapper, but I can't find a > reference in either perlintro.com or http://docs.perl6.org/ > (5to6-perlfunc or top-down) for the equivalents of $? and $! in > P6.What are they? > >

Re: (default) Real->Rat precision should match what compiler uses for literals

2018-03-03 Thread Brad Gilbert
On Fri, Mar 2, 2018 at 4:33 PM, Jim Avera wrote: > Hello, > > Using Rakudo 2018.01: > > my Rat $rat-from-literal = 1.23456789; > my Rat $rat-from-str = "1.23456789".Rat; > my Real $real = 1.23456789e0; > my Rat $rat-from-real= $real.Rat;

Re: Help mechanism in REPL?

2016-09-10 Thread Brad Gilbert
There was some talk in the past about having `.WHY` look up the descriptions in the POD6 doc ( so that we don't have to bloat Rakudo with that information ) On Fri, Sep 9, 2016 at 6:30 PM, Alex Elsayed wrote: > On Wednesday, 7 September 2016 17:57:32 PDT Parrot Raiser