This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
No overloading of f($arg) basing on ref($arg)
=head1 VERSION
Maintainer: Ilya Zakharevich <[EMAIL PROTECTED]>
Date: 15 Sep 2000
Mailing List: [EMAIL PROTECTED]
Number: 242
Version: 1
Status: Developing
=head1 ABSTRACT
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.
=head1 DESCRIPTION
There are several proposals to switch the meaning of C<f($arg)> basing on
the whether $arg is an array reference or not. For example, it is tempting
to allow C<$array[[2,3]]> denote the same as C<$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 C<$array[23]>, but C<$array[2][3]> if the internal
representation if $i23 is (blessed) C<[2,3]>.
Keeping in mind that overloaded objects can be made to behave as array
references even if they are not (see the key C<'@{}'> of overloading)
makes things yet more confusing.
=head1 MIGRATION ISSUES
None.
=head1 IMPLEMENTATION
None.
=head1 REFERENCES
None.