develooper Front page | perl.perl6.language | Postings from May 2004

Re: C style conditional statements

Thread Previous | Thread Next
May 12, 2004 11:53
Re: C style conditional statements
Message ID:
Luke Palmer skribis 2004-05-12 12:46 (-0600):
> Well, the IO-objects are iterators, and you use <$iter> to iterate.  It
> makes sense that <> would iterate over $*ARGV by default.


>     my $n = new IO::Socket::INET: LocalPort => 20010, Listen => 5;

I'd like to be able[1] to write

    my $n = new IO::Socket::INET :LocalPort 20010 :Listen 5;

But unfortunately, parens are not optional with :pairs.


[1] Because I'd use something like that in other contexts. I expect that
I will not use indirect object syntax even in Perl 6 and will in reality

    my $n = LocalPort => 20010, Listen => 5;

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About