develooper Front page | perl.perl5.porters | Postings from August 2013

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Johan Vromans
Date:
August 15, 2013 18:24
Subject:
Re: postfix dereference syntax
Message ID:
m2zjsiolro.fsf@phoenix.squirrel.nl
Ricardo Signes <perl.p5p@rjbs.manxome.org> writes:

> So: ->[] means "the array"
> But ->[1,2,3] means "the slice" (a list)
> And so ->[()] means "the slice of no elements (an empty list)
>
> It's bound to cause painful confusion.

Looks clear and intuitive to me. Much better than ->@* .

(And why would you ever write ->[()] ? )

-- Johan

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