develooper Front page | perl.perl6.language | Postings from August 2010

Re: Buf.pm: FIFO and grammar

Thread Previous | Thread Next
From:
Aaron Sherman
Date:
August 13, 2010 09:06
Subject:
Re: Buf.pm: FIFO and grammar
Message ID:
AANLkTiksg2eBqwEGyGn2JTsCuYh7U9Cm3pJp9W0M1Ow+@mail.gmail.com
On Fri, Aug 13, 2010 at 11:27 AM, Jonathan Worthington
<jonathan@jnthn.net>wrote:

>
>>
> I saw a video camera in the room, but not sure when we'll be seeing the
> footage from that. In the meantime, the slides are at:
>
> http://www.jnthn.net/papers/2010-yapc-eu-signatures.pdf
>
>
Nice talk! One minor nit, and perhaps I'm just misunderstanding some subtle
use of the terminology, but you say:

"In Perl 5, you get a copy of the arguments to work with in @_."

However, this isn't true (again, unless I'm misunderstanding you). @_ is a
by-reference list of positional parameters (Perl 5 only has positionals)
which are all read-write, which it's interesting to note, is impossible in
Perl 6... well, at least in Rakudo, as I'm not sure what the behavior is
supposed to be, but a slurpy positional list in Rakudo that's declared "is
rw" does not change the values passed in:

sub foo(*@_ is rw) { @_[0] = 1 }
my $a = 0;
foo($a);
say $a; # 0

Kind of interesting that you can't easily emulate Perl 5's parameter
passing...

-- 
Aaron Sherman
Email or GTalk: ajs@ajs.com
http://www.ajs.com/~ajs


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