develooper Front page | perl.perl6.language | Postings from May 2001

Re: what I meant about hungarian notation

Thread Previous | Thread Next
From:
Graham Barr
Date:
May 14, 2001 12:51
Subject:
Re: what I meant about hungarian notation
Message ID:
20010514205029.Y22335@pobox.com
On Mon, May 14, 2001 at 03:41:24PM -0400, John Porter wrote:
> Damian Conway wrote [and John Porter reformats]:
> >  
> > @bar[$foo]; # Access element int($foo) of array @bar
> > %bar{$foo}; # Access entry "$foo" of hash %bar
> > @bar{$foo}; # Syntax error
> > %bar[$foo]; # Syntax error
> 
> And why is that superior to:
> 
>   @bar[$foo]; # Access element int($foo) of array @bar
>   %bar{$foo}; # Syntax error
>   @bar{$foo}; # Syntax error
>   %bar[$foo]; # Access entry "$foo" of hash %bar

As I said in another mail, consider

  $bar[$foo];
  $bar{$foo};

Graham.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About