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

Re: Ignoring parameters

Thread Previous
From:
Larry Wall
Date:
June 17, 2005 11:09
Subject:
Re: Ignoring parameters
Message ID:
20050617180927.GA817@wall.org
On Fri, Jun 17, 2005 at 09:19:17AM +0200, "TSa (Thomas Sandlaß)" wrote:
: Ohh, does that mean that ::class can be used as a type
: inside the body? E.g.
: 
: method template ( FooClass ::foo :)
: {
:    my foo $f;
: 
:    ... # use $f
: }

Certainly.  It's exactly the same situation as a &func formal parameter
allowing you to call func without the &.  The :: is a real sigil in that
regard, and function parameters are real declarations.

Larry

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