ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl6-language
perl6-language
Re: sub my_zip (...?) {}
by Larry Wall other posts by this author
Jun 17 2005 11:20AM messages near this date
Re: sub my_zip (...?) {} | PATCH: S04 - unary C<=> is not slurpy
On Thu, Jun 16, 2005 at 10:28:26PM +0000, Luke Palmer wrote:
: 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.

Except I've still got my eye on nullary * to mean "all keys in this
dimension", and that would conflict if you want that meaning for part
of an expression but pipe to a different part.

One character that *would* work in that position is the Unix "pipe"
character: |.

    @foo[|]
    bar(|)

On the other hand, that kind of points out the fact that we *aren't*
using | for pipes in Perl 6.  It'd be nice to have some kind of visual
reference to <== and ==> .  Perhaps

    @foo[<> ]
    bar(<> )

could be forced into that duty, on the assumption that if you really
want a null string, there's always some kind of '' workaround.
But that's concentrating on the pointy parts of the pipe operators.
How 'bout focusing on the pipey parts instead and use a nullary
iterator:

    @foo[=]
    bar(=)

I kind of like that, particularly since the pointy end of a pipe *is*
an iterator.

Larry
Thread:
Autrijus Tang
Larry Wall
Smylers
Gaal Yahas
Larry Wall
Dave Whipp
Larry Wall
Luke Palmer
Larry Wall

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved