python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Why are arrays passed as arguments mutable but scalars are not?
Got this:
#! /usr/bin/env raku
use v6;
multi blah (@arg) { @arg = 7; }
multi blah ($arg) { $arg = '3'; }
my @array = 1, 2, 3;
blah @array;
say @array;
my $string = 'onetwothree';
blah $string;
say ...
StevieD
Votes: 0
Answers: 1
"compose_attributes" is apparently called before attributes are composed
This is another attempt to do this thing, essentially create a frozen class:
my class MetamodelX::Frozen is Metamodel::ClassHOW {
method compose_attributes(Mu \type) {
for self.attribut...
jjmerelo
Votes: 0
Answers: 1
Enforcing read-only attributes from the metaclass
Yes, still going with this. My impression is that there's this powerful facility in Raku, which is not really easy to use, and there's so little documentation for that. I'd like to kind of mitigate t...
jjmerelo
Votes: 0
Answers: 0
Enforcing single instances from the metamodel
I know that it's way easier to ensure single instances from the class level, and that there's the excellent Staticish module from Jonathan Stowe that does the same by using roles, but I just want to t...
jjmerelo
Votes: 0
Answers: 1