Front page | perl.perl6.language |
Postings from April 2006
Re: Adverbs
Thread Previous
|
Thread Next
From:
Jonathan Lang
Date:
April 24, 2006 20:30
Subject:
Re: Adverbs
Message ID:
ef30550b0604242030i41e6fa82s65574646160835b4@mail.gmail.com
Larry Wall wrote:
> Jonathan Lang wrote:
> : How do you define new adverbs, and how does a subroutine go about
> : accessing them?
>
> Adverbs are just optional named parameters. Most of the magic is in
> the call syntax.
Ah. So every part of a Capture Object has an alternate call syntax:
act $foo, @list, bar => 'baz';
is the same as
@list ==> $foo.act:bar('baz');
right?
(And if this is the case, the one capability that the adverb notation
provides that the more traditional named parameter notation doesn't
have is a way to let a particular key to exist without being defined.)
--
Jonathan "Dataweaver" Lang
Thread Previous
|
Thread Next