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

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
August 15, 2013 18:20
Subject:
Re: postfix dereference syntax
Message ID:
20130815181955.GA13939@cancer.codesimply.com
* Johan Vromans <jvromans@squirrel.nl> [2013-08-15T13:42:23]
> It still escapes me why @* was chosen instead of the much more logical
> [] :

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.

-- 
rjbs

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