[% setvar title No overloading of f($arg) basing on ref($arg) %]
To see what is currently happening visit http://www.perl6.org/
No overloading of f($arg) basing on ref($arg)
Maintainer: Ilya Zakharevich <ilya@math.ohio-state.edu> Date: 15 Sep 2000 Mailing List: perl6-language@perl.org Number: 242 Version: 1 Status: Developing
This RFC proposes that the meaning of function calls and operators should not be subtly changed basing on whether the argument is a reference or not.
There are several proposals to switch the meaning of f($arg) basing on
the whether $arg is an array reference or not. For example, it is tempting
to allow $array[[2,3]] denote the same as $array[2][3].
Unfortunately, this prohibits the usage of overloaded data in $arg. For example
my $i23 = new Math::BigInt 23; print $array[$i23]
will not access $array[23], but $array[2][3] if the internal
representation if $i23 is (blessed) [2,3].
Keeping in mind that overloaded objects can be made to behave as array
references even if they are not (see the key '@{}' of overloading)
makes things yet more confusing.
None.
None.
None.