00:27
Guest35 left
02:04
frost joined
02:16
hhcryfqnut joined
04:22
hhcryfqnut left
04:35
zacts joined
05:06
zacts left
05:46
frost left
|
|||
deadmarshal | Why catch blocks are inside the try block in raku? shouldn't the catch block be outside try block like: metacpan.org/pod/Try::Tiny#SYNOPSIS ? | 05:57 | |
lizmat | you don't need CATCH inside a try, and you don't need a try outside of a CATCH | 07:35 | |
in Raku, a CATCH allows you to catch *any* exception *IN* the scope where the CATCH lives | |||
m: CATCH { .resume }; die; say "still alive" | 07:36 | ||
camelia | still alive | ||
lizmat | inside the CATCH, the exception object is in $_, so you can easily do smart-matching on it | 07:37 | |
deadmarshal | great thank you | 08:25 | |
lizmat | "try" is when you just want to be lazy | 08:27 | |
m: say try die | |||
camelia | Nil | ||
lizmat | try will try to execute the code given, and return Nil if there was an exception | ||
m: say try 42 | 08:28 | ||
camelia | 42 | ||
deadmarshal | nice | ||
10:23
zacts joined
10:58
zacts left
11:25
discord-raku-bot left,
discord-raku-bot joined
12:34
frost joined
13:08
razetime joined
13:55
razetime left
15:44
frost left
20:10
Oshawott joined
20:14
archenoth left
22:21
drakonis left
|