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

Re: Sane (less insane) pair semantics

Thread Previous | Thread Next
From:
Juerd
Date:
October 10, 2005 05:59
Subject:
Re: Sane (less insane) pair semantics
Message ID:
20051010125919.GD24163@c4.convolution.nl
Stuart Cook skribis 2005-10-10 22:58 (+1100):
> >   @args = (a => 1, get_overrides());
> >   foo(*@args);
> Not if you want that a=>1 to be a named argument.
> Under the proposal, the only ways to pass a named argument are:
> 1) By using a literal pair in the syntactic top-level of the arg list
> 2) By splatting a pair, hash, or arg-list-object

I find this counterintuitive, and also want arrays to be included in
option 2.

It is consistent with the idea that * expands its RHS and evaluate it as
if it was written literally.

I'd like @_ or @?ARGS or something like that to be a *-able array that
will be guaranteed to be compatible with the current sub's signature.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

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