develooper Front page | perl.perl6.language | Postings from January 2007

Re: [svn:perl6-synopsis] r13526 - doc/trunk/design/syn

Thread Previous
From:
Jonathan Lang
Date:
January 17, 2007 10:48
Subject:
Re: [svn:perl6-synopsis] r13526 - doc/trunk/design/syn
Message ID:
ef30550b0701171048w78790748u2460f57879dddd44@mail.gmail.com
larry@cvs.perl.org wrote:
> +Conjectural: If the first parameter to a multi signature is followed
> +by an invocant colon, that signature represents two signatures, one
> +for an ordinary method definition, and one for the corresponding multi
> +definition that has a comma instead of the colon.  This form is legal
> +only where the standard method definition would be legal, and only
> +if any declared type of the first parameter is consistent with $?CLASS.

Should "...and one for the corresponding multi definition..." read
"...and one for the corresponding sub definition..."?  Or is there
something about methods vs. multis that I'm missing?  And does this
dual declaration have to be restricted to multi signatures?  Why not
say that a method or submethod signature with an explicit invocant
effectively doubles as a corresponding sub definition, with the
invocant prepended as the first positional parameter?

-- 
Jonathan "Dataweaver" Lang

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About