This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
disbot3 | <jubilatious1_98524> @lizmat Maybe --> double-dash arrow inside the signature? À la sub perforate($string --> Str) { | 05:28 | |
lizmat | yes | 09:18 | |
because the return constraint is part of the signature | |||
and can be applied to blocks as well | 09:19 | ||
m: --> Str:D { 42 }() | |||
camelia | ===SORRY!=== Error while compiling <tmp> Prefix -- requires an argument, but no valid term found. Did you mean -- to be an opening bracket for a declarator block? at <tmp>:1 ------> --<HERE>> Str:D { 42 }() expecting any of: pr… |
||
lizmat | m: (--> Str:D { 42 })() | ||
camelia | ===SORRY!=== Error while compiling <tmp> Prefix -- requires an argument, but no valid term found. Did you mean -- to be an opening bracket for a declarator block? at <tmp>:1 ------> (--<HERE>> Str:D { 42 })() expecting any of: … |
||
lizmat | hmmm | ||
ah yes in that case you also need -> to make the grammar parse the signature | 09:20 | ||
m: -> --> Str:D { 42 }() | |||
camelia | Type check failed for return value; expected Str:D but got Int (42) in block <unit> at <tmp> line 1 |
||
15:00
librasteve_ joined
15:14
human-blip joined
|
|||
librasteve_ | teases rakudoweekly.blog/2025/07/21/2025-...-sleeping/ | 16:43 | |
lizmat | librasteve_++ | 16:51 | |
17:01
deoac joined
|
|||
disbot3 | <bobby_jim_birdrock> I'm loving grammars, but it's like learning to swim by throwing myself into the deep end. | 17:04 | |
<antononcube> I disagree. Raku grammars are fairly natural if one knows BNF. | 17:12 | ||
18:31
msiism joined
18:34
deoac left
19:06
human_blip joined
19:07
human-blip left
20:59
msiism left
|