I was reading through E6 again, and noticed something a little
troubling:

    sub part ([EMAIL PROTECTED] 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 ([EMAIL PROTECTED] 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([EMAIL PROTECTED] is copy are constant) {...}

Which would be just how:

    sub foo([EMAIL PROTECTED]) {...}

Would behave.

Luke

[1] Is C<is> looser or tighter than C<of>?

Reply via email to