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

Apoc2 - Context and variables

Thread Next
From:
Nathan Wiger
Date:
May 4, 2001 19:23
Subject:
Apoc2 - Context and variables
Message ID:
00be01c0d50a$bf99f0a0$6401a8c0@office
First off, before I forget to mention it, nice job on Apoc2 Larry! You are
the man. I know alot of us on p6l can seem like harsh critics at times, but
it's only because we love Perl so much. ;-)

Anyways, in addition to the $file.next stuff, I'm curious about a few
clarifications on the new semantics of arrays and hashes. Overall it looks
outstanding. I'm interested in what happens with interactions:

   $a = @b;

Does this:

   1. Get the length (doesn't seem to make sense now)
   2. Pull a reference to @b (like Perl5's "$a = \@b")
   3. Get the first element of @b

Similarly, how about:

   %c = @d;

Does this:

   1. Create a hash w/ alternating keys/vals like Perl5
   2. Do the equivalent of "%c = \@d" in Perl5
   3. Or the mystery meat behind Door #3

Also, I like the *@b prototype slurping idea a lot, but I do worry about
potential confusion with the @*b special class notation. I'm wondering if
the latter can't be @::b?

-Nate



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