🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:08 RakuIRCLogger joined
releasable6 Next release in ≈2 days and ≈11 hours. There are no known blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 07:00
09:59 sena_kun joined
ab5tract m: role R { method m {…} }; my $r = R.new but role :: { method m { “m!” } } 16:02
camelia Method 'm' must be implemented by R because it is required by roles: R.
in block <unit> at <tmp> line 1
ab5tract It would be kind of nice if the above worked, right? 16:03
m: role R { method m {…} }; my $r = (R does role :: { method m { “M!” } }).new; $r.m.say 16:04
camelia Cannot use 'does' operator on a type object R.
in block <unit> at <tmp> line 1
ab5tract Shouldn’t `R.new but role` compose the role before calling `.new`? What if that new role has methods that influence object construction? 16:06
I guess the answer would be “create a dedicated class for it, it’s not that hard" 16:08
But still, it seems a bit surprising to me
this is also annoying 18:15
m: role R { has $.a is required; }; class C does R { submethod TWEAK { $!a = “foo” } }.new 18:16
camelia The attribute '$!a' is required, but you did not provide a value for it.
in block <unit> at <tmp> line 1
ab5tract Feels like we could do the required check after TWEAK, instead of before it? 18:17
jdv vrurg_: github.com/rakudo/rakudo/issues/5472 18:35
lizmat: github.com/rakudo/rakudo/issues/5472
22:48 sena_kun left 22:53 Nemokosch joined 23:01 Nemokosch left, Nemokosch joined