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

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
August 15, 2013 19:31
Subject:
Re: postfix dereference syntax
Message ID:
20130815203108.07bc0b3e@shy.leonerd.org.uk
On Thu, 15 Aug 2013 14:19:55 -0400
Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:

> * 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)

At one time the idea was 

  ->[*]

as a sortof "whatever-star" idea borrowed from Perl6. What happened to
that recently?

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

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