develooper Front page | perl.perl6.language | Postings from June 2005

Re: sub my_zip (...?) {}

Thread Previous | Thread Next
From:
Luke Palmer
Date:
June 16, 2005 15:28
Subject:
Re: sub my_zip (...?) {}
Message ID:
7ca3f016050616152812dd1ffe@mail.gmail.com
On 6/16/05, Larry Wall <larry@wall.org> wrote:
> Or maybe a splat
> 
>     @foo[*]
> 
> Or go with the parens with something in them to indicate the positive
> absence of something.
> 
>     @foo[(*)]
> 
> Anyone else want to have a go at this bikeshed?

You know, before I read this part of the message, I was thinking
precisely that.  Nullary splat should do it, so that @foo[*] will
work.  Unary splat would of course get our favor if it can be
interpreted that way, but in cases like:

    @foo[*]
    bar(*)

It is unambiguous, and you can always say (*) to disambiguate.  I like
the look of that too.

Luke

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