sub part (*@_ is rw) {...}
Well, I<of course> @_ C<is rw>! Otherwise we wouldn't be able to
C<shift> things off of it. What was actually meant, I presume, is:
sub part (*@_ of (Object is rw)) {...} #[1]
Or something. Basically, it's not the array that's read-only by
default, it's the elements.
I figure this would be a common thing to declare, so, hey!, how about a
new keyword? C<a are b> as an alias for C<a of (Object is b)>.
sub foo(@x is constant) {...} # Constant structure, rw elements
sub foo(@x) {...} # Same
sub foo(@x are constant) {...} # Constant elements
So it seems that the default signature would be:
sub foo(*@_ is copy are constant) {...}
Which would be just how:
sub foo(*@_) {...}
Would behave.
Luke
[1] Is C<is> looser or tighter than C<of>?