On Wed, 2 Aug 2000 16:32:40 +0100 (BST), Andy Wardley <[EMAIL PROTECTED]> wrote:
> 
> =head1 TITLE
> 
> Highlander Variables
> 
> =head1 VERSION
> 
>     Maintainer: Andy Wardley <[EMAIL PROTECTED]>
>     Date: 01 Aug 2000
>     Version: 1.0
>     Mailing List: perl6-language
>     Number: TBA
> 
> =head1 ABSTRACT
> 
> Perl5 supports three distinct variable types for any given variable
> name corresponding to a scalar (C<$var>), array (C<@var>) and hash
> (C<%var>).  This RFC proposes that only one type of variable should be
> defined for any given name.  Where an array or hash is defined
> (C<@var> or C<%var>), the equivalent scalar value (C<$var>) would be
> an implicit reference to that array or hash array.  This would permit
> the rationalisation and simplification of the syntax required to
> access individual elements or slices of arrays and hash arrays, while
> remaining backwardly compatible with Perl5 syntax.  The only
> semantic difference would be that scripts could no longer rely on
> C<$var>, C<%var> and C<@var> referencing different variables.

If I could, I would VETO!

This would break about 90% of my scripts. I use the same name for different
type of variables to group them:

        @foo = qw(monday tuesday wednesday thursday friday saturday sunday);
        $foo = 4;
        print $foo[$foo], "\n";

Just a silly example.

-- 
H.Merijn Brand           Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl5.005.03, 5.6.0 & 516 on HP-UX 10.20, HP-UX 11.00, AIX 4.2, AIX 4.3,
     DEC OSF/1 4.0 and WinNT 4.0 SP-6a,  often with Tk800.022 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/

Reply via email to