On Wed, Jul 30, 2008 at 8:22 PM, Will Coleda via RT <
[EMAIL PROTECTED]> wrote:

> On Wed, Jul 30, 2008 at 9:13 AM, via RT Klaas-Jan Stol
> <[EMAIL PROTECTED]> wrote:
> > # New Ticket Created by  Klaas-Jan Stol
> > # Please include the string:  [perl #57410]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57410 >
> >
> >
> > hi,
> >
> > afaics, pdd19 does not specify the syntactic sugar for named arguments.
> So,
> > the following is not specified:
> >
> > foo( "answer" => 42 )
> >
> > This syntax is implemented in IMCC.
> >
> >
> > On a side note, the named parameter specification:
> >
> > .param int "key" => answer
> >
> > was deprecated (but it is implemented IIRC).
> >
> >
> >
> > This TODO is then as follows:
> >
> > Either specify the above argument syntax (e.g. "answer"=>42) in pdd19
> > or remove it from the implementationi.
> >
> >
> > kjs
> >
>
> I just tried to test (.param int "key" => answer) and got an error, so
> I removed it from the PDD (r29880)
>
>
> --
> Will "Coke" Coleda
>
>
Try this:

.sub main
    foo("answer" => 42)
.end

.sub foo
    .param int "answer" => a
    print a
.end

Also, see imcc.y, lines 947-956, this implements this.
I don't think it's ever used, so we could cheat a bit with the deprecation
cycle.

kjs

Reply via email to