Will it be possible in perl6 to overload multis on the const-ness of a parameter, like C++ does? For instance,
multi getX(Foo $self:) returns Int {...} #const version multi getX(Foo $self: is rw) returns Int is rw {...} #non-const version
That second one would have to be:
multi getX(Foo $self is rw:) returns Int is rw {...}
Then we have the issue that Perl 6 objects can't really be "constant", since C<is constant> is a compile-time trait of *containers*...really just a "don't assign to this container" marker.
However, within those limitations, I guess it's possible. After all, we have to check for lvaluability of C<is rw> parameters anyway.
Damian