Enforced immutability: Difference between revisions
Content added Content deleted
(Add Nimrod) |
m (variable trait "is readonly" is not valid anymore) |
||
Line 537:
Variables are considered mutable by default, but may be marked as readonly after initialization:
<lang perl6>my $pi
Unlike variables, formal parameters are considered readonly by default even if bound to a mutable container.
<lang perl6>sub sum (Num $x, Num $y) {
|