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:39
Subject:
Re: what I meant about hungarian notation
Message ID:
20010514203831.W22335@pobox.com
On Mon, May 14, 2001 at 03:23:56PM -0400, Buddha Buck wrote:
> At 08:10 PM 05-14-2001 +0100, Graham Barr wrote:
> >On Mon, May 14, 2001 at 01:56:01PM -0500, Me wrote:
> > > > Hm, OK. What does this access and using what method ?
> > > >
> > > >   $foo = '1.2';
> > > >   @bar[$foo];
> > >
> > > This is an argument against conflating @ and %.
> >
> >No it is not.
> >
> > > It has nothing to do with using [] instead of {}.
> >
> >Yes it does. I was asking if the above is equivalent to
> >
> >   $bar[$foo]  or  $bar{$foo}  in todays perl.
> 
> What is the meaning of the following four expressions in Perl6?
> 
>         @bar[$foo]; # A
>         %bar{$foo}; # B
>         @bar{$foo}; # C
>         %bar[$foo]; # D
> 
> You seem to be advocating A and B, "Me" is advocating A and D.
> 
> Why is one set better than the other?

You forgot

         $bar[$foo]; # $bar is an array reference
         $bar{$foo}; # $bar is a hash reference

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