> my $a = 10
10
> my $x := $a
10
> $x = 5
5
😞
> my $x ::= $a;
===SORRY!===
"::=" not yet implemented. Sorry.
😭
sub prefix:<ro> ($val) {
Proxy.new(
FETCH => method { $val },
STORE => method (|) { X::Assignment::RO.new.throw }
)
}
> my $x := ro $a;
10
> $x = 5;
Cannot modify an immutable value
😎